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
0
votes
2 answers

my button doesnt trigger as should and instead gives two errors (before and after click)

hello I have a button plus a box which alpha is 0 from the start, the button works but the box doesn't appear. In the code the I did use 'getcontents' but it seems it didn't work, the button executes a debug.log so that's how I know that is working,…
adam lewis
  • 11
  • 6
0
votes
1 answer

Why aren't my Unity Game's ui elements working on Google Play store?

I added some ui elements to my game and they work properly in unity and on my device when connected to unity remote. But I uploaded it to google play, downloaded it, and some text doesn't appear, buttons aren't pressable, and the background is red…
0
votes
1 answer

How to restrict width AND height to fit inside parent?

I am building a UI-only application in Unity. I have a container with an Aspect Ratio Fitter of 1.77778 on it to ensure it always has a ratio of 16:9. The problem is that when I adjust the width of the application, I need it to always make sure the…
KeepCool
  • 497
  • 1
  • 6
  • 24
0
votes
1 answer

Unity Stream Audio Slider(Seek Bar)

In Unity, I'm using the following code to stream audio from the server, but I don't know how to add a seek bar(slider to change the playing duration) to it. Any help would be much appreciated. IEnumerator GetAudioClip() { using…
EA1
  • 11
  • 1
  • 4
0
votes
1 answer

How can I modify the height of a rect transform, while making it appear as it is the same position as before in unity?

So I would like to change the height of a rect transform through code, but I want it to appear as if it is at the same position. The reason for this is because I have a mask that I want to slowly increase in size but only upwards (like, it first…
Yuqzii
  • 21
  • 7
0
votes
1 answer

How can i get an ui element to point towards a position that is in world coordinates in unity?

So im trying to make an arrow point towards a position in my scene, i want to rotate the arrow to that position. I have tried to make the world position into a screen position and then subtracting the position of the arrow from that and then settig…
Yuqzii
  • 21
  • 7
0
votes
1 answer

Unity How to get current pressed UI button in Android

How do i get current pressed UI button on Android. I am using GameObject thisbutton = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject; But i am getting null reference on Andoird logcat. Works fine on editor
sandy
  • 11
  • 1
  • 4
0
votes
1 answer

How to change the transparent of a UI group overtime?

I want to make a UI group fade out overtime in unity, but have no clue how to do this.
0
votes
1 answer

Apply color to text with material color

Using TextMeshPro, I would need to apply color to a specific section of the text but at the same time the default text has material color applied. string text = "Here is default text with brown text\u003Ccolor=#4186FC>Blue text…
fafase
  • 467
  • 3
  • 10
0
votes
1 answer

Why does unity shows UI button shows on top of background in game view whereas they are far from each other in scene view?

In the below image, you can see that the scene view and game view are different. The scene view just has the UI button but the game view shows the background image. In the scene view, the background image is so tiny, and is in the lower left corner.…
Kiran Cyrus Ken
  • 379
  • 1
  • 3
  • 17
0
votes
1 answer

How To Give Text A Fixed Position In Your Scene?

The title says it all, I'm relatively new to Unity and what I want to do is have a tutorial scene where you'll see the floating text with instructions that will appear and disappear at the edges of your screen as you walk by it. However, the UI Text…
Grekys
  • 39
  • 5
0
votes
6 answers

Why unityengine.ui is not recognized?

I have a problem were i try to create a score system in my game where the player is getting points based on the distance he travelled, and the vs code is not recognising the "Using UnityEngine.ui;" I already tried to switch vs code to a lower…
PTsag
  • 108
  • 2
  • 9
0
votes
0 answers

UI Error and Method is marked as an override but no suitable method found to override

When I completed my whole game and then went to build it in the build settings, I came up with some of the errors which are general build errors and two errors of a script I haven't touch anywhere in my whole career. The script is a UI script that I…
0
votes
2 answers

How to Position (World space) Canvas Text to create dimensions overlay in Unity

I am trying to create a dimension overlay canvas in Unity. Managed to make one but having difficulties while rotating the gameObject(Cube).The Dimension display text are rotating but they are not repositioning themselves with the canvas and…
yousufali.n
  • 21
  • 2
  • 10
0
votes
1 answer

how to keep setting after scene change

I have a options menu on 1 scene but when you load into the game (Switch scene) then come back (Switch scene) it loses all the settings. I was trying to do it with DontDestroyOnLoad and could not get it to work an i could not figure out how to read…