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

How to instantiate prefab with perfect size in ScrollView at unity3d?

I have some problems with element positioning at unity3d. I try to put data in table rows like this(on FreeAcpect screen). And It's look good. But on wide screen table rows are look narrow. Table row is a prefab. How to make rows responsive?
0
votes
1 answer

How to change text opacity in unity?

How can I change the opacity when the cursor is over the text? Like in those pictures: I'm using TextMeshPro
Brze
  • 525
  • 1
  • 5
  • 8
0
votes
2 answers

Unity3D Text not changing after being set in Start()

I have a Canvas (World Space Render mode) with a Text and a Button component displayed in a tridimensional space (it's a VR app). The canvas instantiated at runtime using a prefab. I get a reference to the Text object using: _codeTextLabel =…
Claus
  • 5,662
  • 10
  • 77
  • 118
0
votes
0 answers

How to fix that shining buttons issue after compiling in Unity Canvas

I'm using some simple buttons in canvas in a 2D game, there is no light or i don't do anything via code for brightness of button. Buttons are shows normally in scene view, but these are shining in game view like putting a lights on them. What's the…
Vultus
  • 9
  • 2
0
votes
1 answer

GameObject disappears during OnDrag

I have an inventory system based largely on this tutorial that I am currently in the process of modifying. OnBeginDrag and OnEndDrag work as expected, but OnDrag, though continuously updating the position of the item, does not display the item. It…
Ben I.
  • 1,065
  • 1
  • 13
  • 29
0
votes
1 answer

How to animate an object from World canvas to Overlay Canvas

I have a bar on the top of my game with some objects plus the game score, pretty basic and usual. I have some coins (similar to Mario's game) that I would like to animate from the world canvas to the top of my bar that is in a canvas overlay. By…
Neliosam
  • 73
  • 11
0
votes
0 answers

Extremely Simple Linear Search Doesn't Work on Android & iOS

I am a total beginner on C# and even more on Unity. I have tried to look for many things on here but didn't find one that solved the problem. This seems like a super simple linear search but it didn't work on iOS & Android. It works only on my Mac…
Sean Saoirse
  • 91
  • 5
  • 17
0
votes
0 answers

How to have fan menu enlarge on mouse hover unity UI, (Only on the Pie shape of the menu, not the square image)?

I am trying to create a Fan Menu in Unity. Currently, I have a crude fan chart that I was wanting to implement a few basic scripts, such as enlarge on hover and call a function on click. I tried to use OnPointerEnter, but it was triggering on the…
0
votes
1 answer

Snap to scrollview elements

I have a scroll view in Unity3D which has all of my elements in it. It scrolls only horizontally and has multiple child elements in view at any time. Most of the time this will be 6, in some rare occasions it can be 5. The setup is 2 rows of 3…
Patrick
  • 135
  • 1
  • 14
0
votes
0 answers

Unity - interface buttons "dislocated" from graphics on phones with notches

We're having this weird problem with a game we're porting to mobile: All UI elements work fine, except when you run it on a phone with notches (iPhoneX for instance). When that happens the interface gets rescaled to fit the device's safe area, which…
Eduardo Z.
  • 633
  • 3
  • 10
  • 32
0
votes
3 answers

Wrong number converting int to string c#

I have simple coin counter, in 2d Unity game. But It's count one coin as 2. I think that it's because of wrong converting int to string. public GameObject coin; // Gameobject with coin public Text CoinCounter; // Text with counter that shows in…
0
votes
1 answer

UI Text Horizontal Overflow Wrap mode

As shown in the image below, I have set the text to wrap and overflow in the box, but no matter what combinations I pick, when the sentence runs long, it continues to the right and disappears from the game view. What am I doing wrong that I cannot…
user285372
0
votes
1 answer

Unity sprites compression using atlases

I'm trying to define the best way of importing/managing my project's sprites. We tried importing atlases, but it turn out to be inconvenient. I tried the Sprite Packer importing sprites (POT/multiple of 4) separately. The Designers can't get it…
0
votes
1 answer

GridLayout or RectTransform Issues

Right now I'm working on a card game in unity3d and I'm trying to use the Grid Layout Group for the enemy's hand. This works fine if everything is predetermined, however when I try to add a card dynamically to the group the position and size of the…
Euan Hollidge
  • 587
  • 2
  • 5
  • 21
0
votes
1 answer

How to make Unity UI object draggable when the objects are instantiating at runtime?

I am working on a management game where every user has some specific characters in save files. I am instantiating these characters inside a panel, I want the user to choose one of the cards and drag it to some specific point. I am able to make a…