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.
- [Hub][Linux] Hub .AppImage does not allow to upgrade the Hub from 2.4.5 to 3.0.0-beta.2
- [Profiler] Current frame button initially hides profile frame marker
- Missing function to reset or unset a specific resource in the local binding space of compute shaders
- [Linux][Hub] Unity Hub 2.4.5 does not open "Add modules" window when clicking "Install with Unity Hub" in Build Settings
- Multiple errors appear in the Console when building for IL2CPP