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.
- Mesh.GetIndexBuffer() requires Mesh's 'Read/Write' flag to be enabled to get its index buffer data in Builds
- [Backport] [Sprite Atlas V1] Editor crashes when calling SpriteAtlasUtility.PackAtlases
- Deterministic builds have different files when built from the same project
- PlayerBuildInterface.ExtraTypesProvider no longer provides types to IL2CPP
- Touch input is reset in Device Simulator when Unity Remote is killed