Questions tagged [unity-ui]

You use this tag to ask question related to Unity3d User Interface(UI) System. The Unity UI system allows you to create user interfaces fast and intuitively.

Unity's UI system provides game developers with tools for creating professional user interfaces, fast, intuitively and efficiently. With Unity UI, you can build simple screens for games—splash screens, level selection screens, or even high-score screens etc.

219 questions
1
vote
1 answer

Unity 3d: how can I display an animation on my character by clicking on a button from my UI designed on UI toolkit?

I have this UI designed on UI Toolkit in Unity 3D. enter image description here I want my character to do a different animation when I click each of the buttons on the UI. I have already set an animator with the needed clips and a boolean var called…
1
vote
3 answers

Unity: How to make a scrollrect fit its content with a maximum height?

I have a Container (1) that I want to grow with its content. Inside this Container (1), I have a Scrollrect (2) that I also want to grow with its content but with max height. The goal is that if there is only one line of text in (2), (1) will be…
Ryan Pergent
  • 4,432
  • 3
  • 36
  • 78
1
vote
1 answer

How to scale Matrix4x4 around point?

I'm writing a custom editor window in Unity in which I would like to be able to both scroll in/out and drag the view around. To do so, I've been setting GUI.matrix to Matrix4x4.TRS(offset, Quaternion.identity, Vector3.one * scale), where I have…
1
vote
1 answer

TextMeshPro is sharing colors with different text objects

I have a treasure counter text object. It's goldish yellowish. Every other text object I make has the same color. When I try to change the color in the inspector (they aren't parented) all text objects change color. If I make it blue then my weapon…
John
  • 197
  • 1
  • 17
1
vote
0 answers

What is the best practice in Unity while loading the scene. Keeping required objects enabled by default or enable them in Start() via code?

If I have 4 different canvases for 4 different UI screens in one scene. And each canvas has multiple panels inside. Canvas list: Pause Game Finish Gameplay Settings Then what is the best practice for best performance, and no extra overhead at…
1
vote
1 answer

How do I close a UI element when a tap occurs outside of it?

There are a lot of solutions to this problem floating around, but none of them seem to work properly for me. I have a button that opens a list of selections in a UI element, and I want it to close when clicked outside of it. I currently have…
David McIntyre
  • 218
  • 1
  • 9
1
vote
1 answer

Random index from the list is not removed and ArgumentoutofRangeException error

In my Unity Project, I have list of 4 signals. In the code, when CheckPress() is called, a random index, what I call the firststimIndex is selected from a list of signals and that index is sent to MAX/MSP via UDP to play some audio. When…
1
vote
1 answer

Slider isn't moving smoothly. (Unity3d)

I have an audio clip and a slider. The slider is acting as a progress bar (Timeline) for the audio clip. I can pause and play the audio also I can skip the track as well. Everything is working fine. The problem is slider isn't moving smoothly it's…
Mirza Zeeshan
  • 99
  • 4
  • 12
1
vote
0 answers

TextMeshPro font doesn't change

I'm using TMP in my project. I have downloaded font - Quanelas. I'm creating font prefab via Font Asset Creator. When I'm trying to switch my font it staying default. It's how numbers, for example, look like: But must be like: I also noticed, that…
1
vote
0 answers

How can I show unity UI Slider filling with unitywebrequest downloadProgress for any file type in android?

(Sorry for bad english) Hi, I'm using this code for download assetbundle or .mp4 files via unitywebrequest : public IEnumerator Download (List urls) { for (int i = 0; i < urls.Count; i++) { string ext =…
1
vote
2 answers

How Do I Enable and Disable Text In Unity Ui?

Hi I am trying to make some popup instructions I want to disable the text when the person presses a key how might I do that?
Lumic
  • 39
  • 3
  • 8
1
vote
2 answers

Unity UI with different screen sizes

I am making a game and have a problem with UI. I made it to scale with the screen size. In 16:9 it looks as I want to: UI is where I want it to be. But when I switch to 2160 x 1080 I have a problem. My UI is outside my game screen I want that my UI…
Mitrand
  • 13
  • 3
1
vote
1 answer

Unity-Press Button to slowly increment number

I'm trying to do something like the old GTA style money system like in Gta vice city or san andreas. So when you add or obtain money, the number doesn't just jump to the result. It slowly increments till the value added is done. I want to do this by…
Pikachu
  • 59
  • 1
  • 8
1
vote
0 answers

Sprite Renderers and UI images scaling

I am trying to match the size of a grid in Unity UI Canvas with another grid which consists of sprite renderers. The UI Cell Grid The Sprite Renderer Grid What I would like to do is to set the UI Grid on top of the Sprite Renderer grid. I was able…
Arvind B
  • 23
  • 1
  • 5
1
vote
1 answer

FindObjectsWithTag bringing back objects in random order in Unity?

I'm attempting to make a level select that requires as little upkeep as possible as I intend on adding updates to add more levels (Unity Scenes) in unity. To account for this I'm attempting to get the level select to create buttons for each level…
Jhon Piper
  • 513
  • 2
  • 8
  • 21