Unity Issue Tracker - GUIUtility.hotControl changes when drawing a button using GUILayout
Closed
UUM-3436
GUIUtility.hotControl changes when drawing a button using GUILayout
Unity: IMGUI Framework
Won't Fix
2023.2.X
2023.1.X
2022.2.X
2022.1.X
2021.2.X
2020.3.X
2022.1 has reached end of life so the issue will be fixed in a newer version.
Reproduction steps:
1. Open the user's attached "Test.zip" project
2. Open the "SampleScene" Scene
3. Select the "Test" GameObject
4. Move the "Test" GameObject along the X-axis using the Move Tool arrow in the Scene view
5. Move it until the number of the "?" buttons changes
Expected result: GUIUtility.hotControl doesn't change and the focus on the Move Tool arrow isn't lost
Actual result: GUIUtility.hotControl changes and the focus on the Move Tool arrow is lost
Reproducible with: 2020.3.28f1, 2021.2.11f1, 2022.1.0b6, 2022.2.0a4
Couldn't test with: 2019.4.36f1 (Scripting errors, couldn't recreate the issue)
Prioritise and Follow this issue
Have a workaround or additional info about this issue?