Search Issue Tracker
OnDrawGizmosSelected() is called twice when selecting child GameObject after selecting a parent GameObject
1. Open user's project "LootArea.zip"
2. Open "SampleScene" Scene
3. Make sure to not place your mouse cursor on Scene View to not cause any redrawings
4. In the Hierarchy window expand "Empty Parent" to see its children and then select the "Empty Parent"
5. Notice one "Draw" message in the Console
6. Select "Empty Parent" child "SpawnPoint"
7. Notice two "Draw" messages in the Console
8. Clear Console window and click on empty space in the Hierarchy window
9. Select "Empty Parent" child "SpawnPoint"
Expected result: Only one "Draw" message gets printed out both when child GameObject is selected first and when it is selected after parent GameObject
Actual result: Two "Draw" messages get printed out when selecting a child GameObject after selecting parent GameObject, and one "Draw" message is printed out when selecting child GameObject first
Reproducible with: 2020.1.0a9, 2020.3.8f1, 2021.1.7f1, 2021.2.0a16
Not reproducible with: 2019.4.26f1, 2020.1.0a8
Couldn't test with: 2018.4.34f1 (Couldn't downgrade to a functioning project)
Note: Similar and more complicated behavior can be observed by clicking around in the "LootArea" GameObject and its child GameObjects
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- "Unknown managed type referenced" error is thrown on Play Mode enter with Profiler recording
- CapsuleCast from certain positions fails to detect a hit
- ShaderUtil.GetShaderData(shader).SubshaderCount does not count unsupported subshader
- GameObject.GetComponents returns the wrong number of components
- GUI button looks different from Editor in a Build