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.
- Standard Unity Materials and Shaders become corrupted after importing specific Asset Packages
- [Linux][OpenGL][Vulkan] Draw calls are not shown in the Event List when taking a capture of a frame with RenderDoc
- Inaccurate collision detections when Rigidbody Collision Detection is set to "Continuous" or "Continuous Dynamic"
- Crash on Object::IncrementPersistentDirtyIndex when upgrading project version
- [iOS] Multiple Xcode project instances created before opens up when performing Build and Run for iOS Platform