Search Issue Tracker
Fixed
Votes
0
Found in
5.3.5p4
Issue ID
807114
Regression
No
Menu.SetChecked doesn't work from a method marked with [DidReloadScripts]
Reproduction steps:
1. Open the attached project "Repro.zip"
2. In menu select "Test/Recompile scripts"
3. Notice the output in console and that "Test/test" did not get flagged
4. Now select "Test/Menu.SetChecked()" and notice that "Test/test" is not flagged
Expected result: Selected item is expected to be flagged after Menu.SetChecked is called in the method which is marked with [DidReloadScripts]
Actual result: SetChecked doesn't work from a method marked with [DidReloadScripts]
Reproduced in: 5.4.0b23, 5.3.5p4, 5.1.4f1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- The build size is larger when Models have Animation Type set to Generic
- Error "ArgumentException: Both 'ok' and 'cancel' strings are null or empty" logged when User is trying to create circular dependencies in UI Builder Hierarchy
- "SupportsRandomWriteOnRenderTextureFormat()" shows "False" when executed on 2023.2 and 6000.0 streams
- Size of ShadowCaster2D with Casting Source set to a Collider increases when RigidBody2D is attached to the GameObject
- GameObjects with a material derived from a Custom Lighting Surface Shader are displayed as skewed on quads when the Camera's Width and Height properties of the Viewport Rect are lower than 1
Ghat-Smith
Dec 11, 2017 12:38
Got the same problem in 2017.2.0f3, but I found a fix. You can call SetChecked in the MenuItem validation method. See documentation (https://docs.unity3d.com/ScriptReference/MenuItem.html) for more details about MenuItem validation implementation.
Jeiel
Jun 08, 2017 06:03
This issue seems to be stuck in review for almost a year now.