Search Issue Tracker
By Design
Votes
0
Found in
2021.3.35f1
2022.3.20f1
2023.2.11f1
2023.3.0b8
Issue ID
UUM-64362
Regression
No
Nothing happens when modifying Visual Element's style via code with input actions
How to reproduce:
1. Open the user’s attached “Circulus.zip” project
2. Enter Play Mode and press the “E” key a few times
3. Observe the Game view
Expected result: UI disappears and appears
Actual result: nothing happens
Reproducible with: 2021.3.35f1, 2022.3.20f1, 2023.2.11f1, 2023.3.0b8
Reproduced on: macOS 14.2.1 (Intel)
Not reproducible on: No other environment tested
Note: tested with Input System 1.7.0 and 1.8.0-pre.2
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
- 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
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
To hide and element's entire hierarchy, you need to use style.display = DisplayStyle.None, not style.visibility = Visibility.Hidden. The difference is that in the case of visibility, if a child element also sets their visibility to Visible, then it will supersede its parent's style and retain it's visibility.
Modifying the provided project's code to use DisplayStyle instead of Visibility makes the project behave as the user expected.