Search Issue Tracker
Building Player: HideFlags.HideAndDontSave not respected when ExecuteInEditMode is on.
Very serious issue affecting Unity 4.x and 4.1 (tested in RC3)
Incorrect dependencies in scene, not respecting HideFlags.HideAndDontSave when ExecuteInEditMode is on.
1. Build and run the project
2. Open up the log and observe.
3. DumpAllTextures is called twice, once before and after the dynamically loaded texture is loaded in. Observe thta dk_i1 is loaded in BEFORE it is loaded and assigned (at runtime, its meant to only load dk_i2). After loading in, both i1 & i2 are loaded in, when only i2 is meant to be loaded in.
Expected behaviour: (and behaviour in 3.5)
- Before loading the texture in Awake, there should be no reference to dk_i1.
The code in Repro.cs should be self explanatory but some docs here.
1. In Awake, I create a material, hideflags.HideAndDontSave, load a texture using Resources.Load and assign it to the renderer. This material is destroyed in OnDestroy.
2. The script executes in edit mode, but is rigged to load a different texture dynamically in edit mode & play mode.
3. When building, it looks like Unity is saving a reference to the texture, but not the material.
It's a possible regression.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Renaming a Scene deletes its GameObjects when a Scene with that name was already deleted
- Crash on GameObject::ActivateAwakeRecursively when exiting Play Mode
- [Asset Bundles] Bundles are not cached when using certain request URLs
- [URP] Color correction effects are applied to overlay camera when only being added to the base camera
- Ribbon trail with Attach Ribbons To Transform checked and Simulation Space property set to World is attached to (0,0,0) position