Questions tagged [unity-ui]
Unity UI is a UI toolkit for developing user interfaces for games and applications in Unity. It is a GameObject-based system that uses Components and the Game View to arrange, position, and style user interfaces.
222 questions
0
votes
0
answers
24
views
How to change colours of UI in Unity using Animation?
I'm making UI that's using controller support, and therefore I have to script it and use an Animation, but how do I make sure that a color change when hovering over a button happens instantly, because ...
0
votes
1
answer
29
views
How to build a Unity WebXR scene that uses raycasters?
I am fairly new to Unity. I want to create a VR project that I build to WebXR and publish to the web. I am using the sample scene from this project and it helps me get up and running. I am able to ...
0
votes
0
answers
31
views
Blurry Board Game Node Images in Unity (UI & Sprite Issue)
I'm developing a board game in Unity and facing an issue with image clarity. The board consists of multiple nodes, each displaying a 480x600 px image. However, these images appear blurry and ...
0
votes
1
answer
95
views
Resizing a Sprite in 3D space to match its native pixel size at a target screen resolution?
I am placing a 3D game object with a SpriteRenderer + Billboard attached to it in my scene.
However, since it's a distance away from a perspective camera, the sprite gets scaled, losing a lot of the ...
0
votes
1
answer
29
views
How to prevent button drift (despite anchoring) when resizing game window?
My Unity game has graphics designed for aspect ratios of 16:9, 16:10, 4:3, 3:2, and 19.5:9. This worked for mobile. But now I want to create a PC version for Steam, and I have to deal with the user ...
0
votes
0
answers
28
views
Unity Editor Api for scriptable object apply on Edit Mode
So i want to design an editor which has the following requirements.
Suppose i already have a prefab called Player.prefab and script attached as Player.cs
And have a scriptable object called ...
1
vote
1
answer
134
views
How should I go about handling multiple phone resolutions from a reference resolution?
I built my entire game in Unity based on my Android phone resolution, both for UI and object sizes. Now, everything looks good for a 1080 x 2400 resolution, but I know that's not the aspect ratio of ...
0
votes
0
answers
101
views
How to Create a Popup Window in Unity UI Toolkit for Runtime?
I’m working with Unity’s UI Toolkit and trying to implement a popup window that appears when clicking a menu button. The expected behavior is that when I click the menu button, a popup window with ...
0
votes
0
answers
57
views
Unity UI Images without a sprite set are invisible when the containing scene is loaded additively
I have a game with several scenes, all loaded using addressables:
A persistent scene that stays loaded with things like the main
camera and certain common game systems.
A lobby scene
A game scene
...
1
vote
0
answers
44
views
Unity Button ID is -1
I have a UI Document on a gameobject. while hovering on a UI button when i press mouse 4 on my logitech g502 it gives me an error. I did this by accident when i pressed mouse 4 instead of left ...
3
votes
2
answers
583
views
Rendering transparent UI in Linear Color Space
As you may know, Unity can have issues correctly rendering transparent 2D Sprites/Textures exported from Photoshop or Figma. Reason being that most of these tools operate in Gamma color space while ...
0
votes
1
answer
45
views
Coins Not Moving to Canvas Position When Camera Moves
I am currently developing a 2D game in Unity, and I'm having an issue with moving coins to a specific position in the UI Canvas when they are spawned. I want the coins to animate from their spawn ...
0
votes
0
answers
40
views
How to copy the callstack with time costs from a Unity Profiler sample?
From the profiler window in Unity, I want to be able to copy as text: the call stack starting from a method up to the “root” method, including the duration of each method.
Is it possible to “hook” ...
0
votes
0
answers
35
views
How to check if StyleBackground is set?
I want to implement some lazy initialization of a property of type StyleBackground like this:
...
0
votes
0
answers
27
views
why my button isn't showing clicked in unity [duplicate]
So i was following this tutorial https://youtu.be/lF26yGJbsQk to make a start button for my unity game. But some how the button is not working and don't know why?