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.
- Styling issues in the app toolbar
- Perforce integration - Attempting to add a P4Ignore ignored file does nothing
- URP ScriptableObject SerializeField value set to default during the first Import
- Variables use old overridden values on Prefabs when a variable has FormerlySerializedAs attribute
- [GPU PLM] 100% repro crash when baking EnterTheRoom with 4K maps when using system allocator