Search Issue Tracker
Fixed in 2021.1.X
OnSceneGUI is not being called when using a certain layout
1. Create a new project
2. After Editor loads shut it down completely
3. Open project root and navigate to Library folder
4. Replace "CurrentLayout-default.dwlt" with the one attached in edits
5. Open the project again
6. In the scene create a new empty GameObject at (0, 0, 0)
7. Attach the "SceneGUIExample.cs" script to the object
8. Select the GameObject and inspect the Scene
Expected result: OnSceneGui is called and there is a rectangle wireframe in the scene at GameObject's position
Actual result: OnSceneGui is not called and there is no rectangle wireframe in the scene GameObject's position
Reproducible with: 2021.1.15f1
Not reproducible with: 2018.4.36f1, 2019.4.29f1, 2020.3.14f1, 2021.2.0b4, 2022.1.0a3
1. looking at a diff tool the layout file where the issue reproduces is mostly different in some of the values (not by a great margin). Some lines seem to be missing, though the file does not appear corrupted or anything of the sort.
2. I am not sure if the issue here is OnSceneGui not working with the layout, or the layout being somehow edited during the game creation process so that the issue starts reproducing.
3. An upgrade of the project might resolve the issue, but I did not find it consistent
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Camera active Texture is not written if another camera has a Script using "OnRenderImage"
- The Camera's background color is white when the device Appearance is "Light Mode"
- Particle System isn't culled off-screen when the Culling Mode is set to Automatic and the Simulation Space is set to World
- Main Player window is moved to the primary display when it's launched on a 3rd monitor and the 2nd monitor is activated
- Crash on Mesh::RecalculateBounds when assigning not enough vertices for two submeshes