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
2
votes
1 answer

Unity: Why can't I automatically select my input field?

I'm currently developing a Highscore system for Android. I have an Input field where the player will enter their name. I want it so that the player doesn't have to tap on this input field in order to type into it. However, all my attempts have…
Pierre Gravelle
  • 53
  • 2
  • 15
2
votes
2 answers

Cannot change Canvas.overrideSorting property

Very odd problem, I have a Canvas object and I am trying to set the overrideSorting flag to true. public void SetSortingLevel(string sortinglayerName) { _canvas.overrideSorting = true; _canvas.sortingLayerName = sortinglayerName; } However,…
Aggressor
  • 13,323
  • 24
  • 103
  • 182
2
votes
1 answer

Unity 2017: Canvas Not Rendering on Build

I've been using unity for quite some time. But I downloaded the latest version 2017.2.1f1 and started a new project. Everything is running fine in the game and scene view. Playing the game in the editor is working fine as well. However, when I build…
Harman Kamboj
  • 429
  • 7
  • 20
1
vote
0 answers

Can not get the following UI (see Image) correctly in Unity Editor in World Space (LayoutGroup, LayoutElement, ContentSizeFitter, ...)

i know this might be a lot to ask, but unfortunately i can not get the following UI working in Unity. I experimented a lot with Content Size Fitter, Vertical and Horizontal Layout Groups and Layout Elements, but after a certain depth of the objects…
1
vote
0 answers

How to debounce UnityEngine.UI.Button.onClick

Situation On old and worn-out controllers, sometimes pressing down a button a single time will result in multiple button presses. I'm aware of ways to handle that issue when it comes to my own game logic. However, I'm unaware of a clean solution…
1
vote
0 answers

UnityEngine Can't Deserialize Sprite

i working on a save system for my game. Basically, i was using JsonUtilty for saving system but it didn't help me because i want to save a list with ScriptableObjects. I was saving and loading correctly but when i restart the editor/computer it…
hidro0x
  • 11
  • 1
1
vote
1 answer

Responsive Game View - Game View Is Not Same At Different Screen Resolutions

I need your information! I'm cloning the game called Toon Blast to improve myself. In the picture below, you can see 2 screenshots from the original game on the left, and 2 screenshots from my own version on the right. As you can notice, while the…
Hasan Ozen
  • 25
  • 4
1
vote
1 answer

Lightning and display issues with Unity CanvasRenderer

My goal is to draw simple, colored meshes on a Canvas in Unity. I set up a Canvas and chose Render Mode World Space. I then added a GameObject, set its RectTransform, added a CanvasRenderer (later also a MeshFilter and MeshRenderer) and a script to…
ZoKi Mo
  • 51
  • 1
  • 5
1
vote
2 answers

How can I stop a game object box collider triggering underneath a dropdown box UI element?

How can I stop a game object box collider triggering underneath a dropdown box UI element? When I select a dropdown list item, it also sends a click through to the game object beneath the dropdown list. Obviously we only want one UI element getting…
Ratbyte Boss
  • 461
  • 4
  • 13
1
vote
0 answers

How do I create a RecyclerView for Unity?

I'm trying to recreate android's RecyclerView on Unity using ScrollRect and Unity's object pooling system. I was able to make it work great when scrolling using the mouse, but when I drag up and down (for mobile) it just loads everything down very…
1
vote
1 answer

How to convert anchored position in unity RectTransform to other anchored position?

I want to make a responsive image cropper in the canvas. But the main problem is that I cannot find any function in Unity API that help me to convert anchored position to another anchored position with deferent anchor. So is there any method for…
1
vote
3 answers

Unity - TMP Input Field : How to limit number of digits after decimal point in Decimal Type

Is there any easy way to limit the number of digits after the decimal point with an TMP_InputField set at decimal type ? For exemple, if the user type 12.347, I want the text to stop at 12.34 Thank you !
Deltaaaa
  • 11
  • 3
1
vote
0 answers

Calculate image pixel size that is rendered by the camera Unity

I try to find the area of the UI images that are seen by the camera in game view. My thoughts is to color the background in 1 color and calculate the area occupied by other UI elements rendered in front of background, by subtracting the background…
Tim M
  • 19
  • 1
1
vote
2 answers

How to load images into an array of class?

I have following code in which I wand to load images. But whenever I Run the code other fields in collection are found empty and only one image is found in all collection data, & The following error is generated. IndexOutOfRangeException: Index was…
Omkar P
  • 29
  • 5
1
vote
1 answer

Unity Scene Window GUI Buttons are not rendering properly

I recently installed unity 2021.3.2f1, everything is fine, but the scene window buttons are not rendering properly, mainly there icons. Is there a way to fix this issue? NOTE: My PC does not have external graphics card, and I am running 2nd gen i3…
Techno Soft
  • 9
  • 1
  • 3
1 2
3
14 15