I wrote an editor script to de-parent GameObjects via Transform.SetParent(null)
if all of their parents had default scale and no components.
This executed in IProcessSceneWithReport.OnProcessScene()
.
I had one particular GameObject in the scene with such a parent, and made a UI text that would show the name of that parent, or "None" if it was null (showing that my build script worked).
All of the above worked nicely, and when I played the scene or built the project, my UI text showed "None".
When I deleted the script and played the scene, it showed the name of the parent object.
However, when I built again with the script now deleted, the executable once again showed "None", as if the script was still there.
What could be causing the build to act as if the now-deleted script was still there?
I'm using Unity 2022.3.35f1.