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.
- Inconsistency displaying company name in Package Manager UI
- GPU lightmapper doesn't work on Linux any more
- [Editor] Recent scenes should not include (DOTS) subscenes
- Interaction is broken when EditorGUI.indentLevel is set to 1 or higher and ParticleSystem.MinMaxGradient interface is used
- Mouse position is not updated when locking the cursor and it causes the mouse to snap unpredictably when entering the Play Mode