Search Issue Tracker
By Design
By Design in 2023.1.X
Votes
0
Found in
2020.3.43f1
2021.3.16f1
2022.2.1f1
2023.1.0a21
Issue ID
UUM-21615
Regression
No
Menu Validate functions are called when a not-related function is triggered
Steps to reproduce:
1. Open the “IN-16767_NestedMenuCheckedErrorReproduction” project
2. Go to NestedMenuTest → Settings → Enable Alpha
3. Observe the Console
Expected result: Only “EnableAplhaValidate” and “EnableAlpha” logs are shown
Actual result: “EnableGammaValidate”, “EnableAlphaValidate”, “EnableBetaValidate”, and “EnableAlpha” logs are shown
Reproducible with: 2020.3.43f1, 2021.3.16f1, 2022.2.1f1, 2023.1.0a21
Reproduced on: macOS Ventura 13.0.1 (Intel)
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
Hey, MenuItem Validate function is used for preventing function assigned to MenuItem itself from execution.
It is invoked in two places - just before displaying menu nodes for possibility to enable \ disable those and second time when invoking menu item just before it's execution.
if (MenuItemValidate())
MenuItemAction()
In this specific case the former action happens, OS asks for menu contents to be displayed and all Validate function registered to that menu level are called.
Resolution Note (2023.1.X):
Hey, MenuItem Validate function is used for preventing function assigned to MenuItem itself from execution.
It is invoked in two places - just before displaying menu nodes for possibility to enable \ disable those and second time when invoking menu item just before it's execution.
if (MenuItemValidate())
MenuItemAction()
In this specific case the former action happens, OS asks for menu contents to be displayed and all Validate function registered to that menu level are called.