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

  1. 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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.