Search Issue Tracker
Fixed in 5.3.8
FindObjectOfType in OnValidate of referenced prefab leads to objects not getting activated in editor
1. Open User's project
2. Notice that "Prefab2" is greyed in hierarchy, but the activation checkbox is checked - FIRST odd behaviour
3. Create new scene
4. Add "Prefab0" and "Prefab2" to hierarchy (in this order)
5. Add "SomeOtherComponent" script to "Prefab2" gameObject in hierarchy
6. Save scene
7. Create new Scene (going to other scene does not reload "asdf" or this new scenes. Creating new one does)
8. Go back to the New scene (while testing it did not greyed as it does on User's scene)
9. Try switching "Prefab0" and "Prefab2" order
10. Save and Reload scene (create new scene and go back to this one or double click this scene in Assets folder)
11. Notice that gameObjects' order is the same as before switching (the same happens with original "asdf" scene) - SECOND odd behaviour
-Note: 9-11 steps did not reproduce on 5.4, however, "Prefab2" in "asdf" scene was still greyed.
Expected: Only inactive gameObjects are greyed in hierarchy and scene saving applies to gameObjects' order in hierarchy too.
Actual: "Prefab2" is greyed even though it is active (checkbox) and saving the scene (in 5.3 and lower) did not save its order.
Reproduced in versions: Unity 5.2.4f1, 5.3.4f1, 5.3.5p1, 5.3.5p2
Reproduced Only the "FIRST odd behaviour" (step 2) in versions: Unity 5.4.0b20
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Aplying changes to root prefab in a nested prefab undo changes made to the child prefab
- Sub Emitter particle's width is twice its height when Separate Axes in the Size over Lifetime module is enabled and set to 1
- Animation does not play correctly when Optimized Game Object functionality is used and a Child GameObject is added to bone
- An object created via "Create Empty Child" of Hierarchy panel in Prefab Mode is always a child of the main prefab
- [VCS] Version Control window could use a search field to filter down contents