New answers tagged

1 vote
Accepted

How to manage UI sound effects?

AUDIO MANAGER The best solution in my opinion would be to have an AudioManager in your scene. You can give it an AudioSource and and some sort of 'AudioManager' script. The script can just contain a ...
Pow's user avatar
  • 154
1 vote
Accepted

How to get value of transitionDuration in C# for Unity UI Toolkit

By chance, I discovered that I am able to get the value of transitionDuration using this code: ...
Mfa Xyz's user avatar
  • 11
0 votes

Unity UI Buttons not working (not clickable)

The problem was the Hearts Panel, I resized it, added Graphic Raycaster to Background, Buttons and Shadows and it started working!
Pablo Frank's user avatar
0 votes
Accepted

Using an InputField to enter a distance and then move an object to a location based on the input: object returns to old position

If you want to pass a reference to a live-updating value, it needs to be inside a reference type like a class that has its own independent lifetime: ...
DMGregory's user avatar
  • 133k
1 vote

Unity UI Buttons not working (not clickable)

To confirm which button the system thinks is available do this: Run the game. Find your EventSystem in the hierarchy and expand it. Move your mouse/pointer over each button and look for pointerEnter ...
Chris Masterton's user avatar
3 votes

Thin lines appear differently even though they are the same height

The issue, as other folks have pointed out, is that Unity is doing ~the best it can with the information it has. Because the reference size of your UI and the actual size of the screen are different,...
Mhin Ra's user avatar
  • 31
0 votes

Unity UI Builder InvalidCastException

The problem was that I created a style sheet with the same name, and the script was trying to cast it to a VisualTreeAsset which is supposed to be a uxml file...
Džoni's user avatar
  • 36

Top 50 recent answers are included