Search Issue Tracker
By Design
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
- UI Toolkit rendered text breaks when toggling FontWeight styles through code
- Transparent pixels are still hit when alphaHitTestMinimumThreshold is set to a non-zero value
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
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.