Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
1k views

I am attempting to draw a box around a selected target in my space game. I had this working fine using normal techniques when my canvas was set to Screen Space - Overlay. However my setup is that ship ...
David Burford's user avatar
2 votes
1 answer
917 views

I have a nested ScrollRect, or more specifically a scrollable list inside one of the items in another scrollable list. Think of it as a scrollable menu with one of the items including a scrollable ...
Petrus Erasmus's user avatar
0 votes
1 answer
226 views

I'm working on a point and click system in Unity and I have a contextual menu that appears when you right click on an object. In this menu, there's a button called "search" that moves the ...
pocketlint60's user avatar
1 vote
2 answers
18k views

I made a simple survey from a guide on YouTube. The trouble is that dropdowns are not mentioned in there, and I have totally no idea how to get the selected text value from it. I tried multiple ...
Kewin Ratajczak's user avatar
0 votes
0 answers
270 views

There's an section of the documentation that refers to something that may be the answer, but unfortunately, if I keep holding with my finger the draggable object, even when I'm not moving my finger, ...
YoshGJ's user avatar
  • 535
0 votes
1 answer
466 views

In the script below, "btn" is a local variable in OnEnable() method. It's said that local variable is deallocated (lost) when leaving the countaining method. Why this one (btn) is not ? Nb: ...
Achie1's user avatar
  • 181
0 votes
1 answer
854 views

I'm new to Unity and coding (C#), so sorry if this is a novice question. Is the OnDrop function only usable for UI elements? I am currently making an ARPG Card game ...
Michael Surs's user avatar
1 vote
0 answers
1k views

I'm having an issue figuring out how to make the scroll move slower than very fast mouse drags/swipes. I've tried changing the scroll sensitivity, inertia deceleration rate, and the EventSystem's drag ...
complex problem's user avatar
0 votes
1 answer
221 views

I have a simple mobile game where every time I touch the screen, the car changes direction. The thing is, I need to implement a pause button, but when I click pause I need the car to stay still and ...
Gabriel Ozzy's user avatar
1 vote
0 answers
501 views

In my game, the player drives a car and when the car reaches the end of the road, I want a different road prefab to be spawned. I have multiple road prefabs, and want to be able to spawn one when the ...
KillerRobot.blend's user avatar
0 votes
1 answer
169 views

I am having some issues with the UI and the Input system. What I am trying to do is "simply" to make a menu appear and disappear upon pressing a certain key. To do so, I created an animator ...
FSic's user avatar
  • 188
1 vote
0 answers
247 views

I am using the Unity UI Toolkit and I would like to create my own TextField class (ie. input field, similar to the one I'm typing in now to write this message) with better functions using the Label ...
mike's user avatar
  • 501
0 votes
0 answers
780 views

I'm using UILineRenderer to draw curve of the map. The one thing I'm finding is that the drawing is pixelated despite adding more data points. setting the quality in game view to 4K UHD, and ...
ThePedestrian's user avatar
1 vote
2 answers
2k views

I've run into a problem where using the CanvasGroup component to fade in/out several Image components under a hierarchy produces an unwanted result, where each individual sprite that overlaps with ...
complex problem's user avatar
1 vote
0 answers
139 views

I have a UI that I want to animate via PointerEnter and PointerExit, but if an event gets fired while an animation is in progress, it makes the animation jump to the start point of that animation clip ...
ShadowTheFox's user avatar
0 votes
0 answers
1k views

I'm trying to place a 3D object on top of a UI Image But nothing works. Can anyone give an example of how to add a 3d model on top of a UI Image in a 2d game. The strange thing is that I have all the ...
zeni1agent's user avatar
0 votes
1 answer
356 views

I'm creating some sort of database editor window, and one of the things I needed to do was show the default inspector for the currently selected scriptable object. It was a bit complicated to achieve ...
YoshGJ's user avatar
  • 535
0 votes
1 answer
639 views

Using the built-in text UI, is there a way to animate only a selected number of letters? What I want to do is something like the word "you" in this video and "I'd" in this one
Arian_ki's user avatar
  • 691
2 votes
1 answer
5k views

I'm using Unity UI Toolkit in Unity 2021.2. Looking at the following example: ...
TheWolfNL's user avatar
  • 163
0 votes
1 answer
1k views

I have a main menu scene in which the buttons work using button component's animation transition. I created a simple animation for them that changes their vertex color to blue when selected. The ...
Ali's user avatar
  • 55
0 votes
0 answers
52 views

I read from the book that 0 - 7 layers are reserved layers in Unity but when I open layers on Unity its showing me that I can use layer-03, 6 and 7 and so on. So can I say that only 5 layers are ...
AHF's user avatar
  • 101
0 votes
0 answers
176 views

Trying to understand the Unity UI system. I have a panel that contains a button that should hide the panel. When I wire the button up to the method that hides the panel, I can see in the console that ...
arcadeperfect's user avatar
0 votes
0 answers
12 views

I'm trying to do simple card game. I want players to drag and drop cards from hand to table, from deck etc. The simplest and cleanest solution for drag and drop I found is to use Image object on ...
ostojan's user avatar
  • 101
0 votes
1 answer
703 views

I am learning about Actions/Events in Unity and just built a system around them which works. However, it seems I just got lucky and I'm not sure why. Roughly, my class in a simple illustrative form (...
mike's user avatar
  • 501
3 votes
1 answer
987 views

I am creating an editor tool that requires me to enable / disable components and or gameObjects via script while in edit mode. Currently everything that has to execute in edit mode is called from <...
arcadeperfect's user avatar
0 votes
1 answer
778 views

I am trying to write a real time Line Graph Renderer using the UI system in Unity 2019. Meaning I need to change the data on the fly and have the graph update. What i have found is that OnPopulateMesh ...
MattFace's user avatar
  • 121
0 votes
1 answer
770 views

Im basicly looking to create this image: I have all these parts and black background as a separate image so the ideal thing would be to place them with border between them but I could also probably ...
Ivan's user avatar
  • 379
0 votes
1 answer
389 views

I am struggling to figure out how I can add a UI prefab on screen in code so that it appears "anchored" at the bottom center of the screen. I realize this might be a common question. I ...
tatmanblue's user avatar
0 votes
0 answers
189 views

Basically I have an image that represents a map where you go from one level to another. I was planning for this image to repeat it selfie while you go up thru the map to new levels( something like the ...
Ivan's user avatar
  • 379
0 votes
0 answers
193 views

I have a layer rendering issue, where the top layer of content will sometimes not render to screen as it appears that the bottom layer is rendering on top (even though it's behind in world space). It ...
A__'s user avatar
  • 163
2 votes
1 answer
288 views

Is there a way to force a Unity canvas set to "Constant Physical Size" to scale based on an arbitrary DPI value for testing purposes? It seems to only respond to the meta-data from the ...
arcadeperfect's user avatar
1 vote
2 answers
952 views

Trying to make some inspector controls that both modify the same thing but in different ways, and I want them to both update when the other is edited. Won't bore with the details but there's a reason. ...
arcadeperfect's user avatar
0 votes
0 answers
80 views

is there a way to deserialize .unity and ProjectSettings file in binary format down to yaml? I provide an example of one of such ...
jackb's user avatar
  • 101
0 votes
1 answer
159 views

My app will feature tokens to fund some in app functions. If someone clicks a menu button to run a paid function and has insufficient tokens, they should be prompted with a new token purchase menu to ...
mike's user avatar
  • 501
1 vote
0 answers
196 views

This is probably basic question but can I set the point from which fill starts. I know about down, up, left, right options but I want more control with start point, for example I want my fill to start ...
Ivan's user avatar
  • 379
2 votes
1 answer
14k views

It seems Unity UI Image supports Image Type 'Tiled', but I'm not sure how to get the tiling to work both vertically and horizontally. Can someone help me understand?
ina's user avatar
  • 294
1 vote
0 answers
40 views

When I'm typing into a tmp input field on a mobile keypad, I can't instantly edit another input field by clicking it!? I have to click off the keypad to loose focus on the current before I can click ...
riaan du toit's user avatar
0 votes
1 answer
255 views

https://www.youtube.com/watch?v=Tqqf5Y8LyR8&t=23s&ab_channel=ErikLoyer So I want to achieve a transition like from the above video, specifically at 0:23 the TRACK, but there is a 3 Dimensional ...
mkzza's user avatar
  • 1
0 votes
1 answer
2k views

I've got some UI elements and a 3D mesh imported from blender. I've tried stuff like sorting layers, so that I render my 3D mesh below a canvas UI element(side panel), for which I put my 3D mesh ...
BumbleBee's user avatar
0 votes
2 answers
8k views

I am trying to set a variable from the value of a DropDown menu in Unity. I wrote a script as follows, attached it to the dropdown and set it to run it in Unity under: On Value Changed (Int32). I have ...
mike's user avatar
  • 501
0 votes
1 answer
356 views

I'm trying to place one in our field right below another, all ui belonging to an overlay canvas. I tried doing a few different ways subtracting height from different position types including rect ...
riaan du toit's user avatar
0 votes
1 answer
2k views

I am trying to make a scrollable list with premade elements that you can add using a button. The problem is that the list's Content element needs to be exapanded as ...
GospelBG's user avatar
0 votes
0 answers
98 views

Using UI Panel component is convenient in the sense that the panel will always be stretched to the size of the screen at any resolution, unlike a sprite (in simple mode) the size of which depends on ...
Serg's user avatar
  • 393
1 vote
1 answer
3k views

In Unity I created a Panel with 3 children (An UI Image (LogoAch), and 2 TextMeshPro components (Name, Progress)). It looks something like down below: I saved this as a prefab and I try to instantiate ...
Stefan's user avatar
  • 117
0 votes
1 answer
1k views

When in distance the shadows are appearing correctly but when getting near to the shadows it is getting clipped in a weird way. I was not able to fix it. Any help would be appreciated.
Krishnan's user avatar
0 votes
1 answer
2k views

I'm using Vector Graphics for my SVG Images, though when I try to use it as a UI image (for a button) The image doesn't look as I expect, unless I use a Sprite Renderer. But unfortunately I can't do ...
Ariel's user avatar
  • 1
0 votes
1 answer
116 views

I've coded something in Unity using C# (see below) for a dialogue scene separate from the actual game. On the click of a button from the game, the player is taken to this dialogue scene where the ...
username__hidden__'s user avatar
2 votes
1 answer
1k views

I'm working on a timeline UI element in Unity, that looks like this: I generate the bottom ticks by instantiating a number of times over the length of the parent RectTransform, and offsetting them on ...
Rug's user avatar
  • 125
2 votes
1 answer
1k views

I am searching now for almost an hour and I cannot figure out how correctly to select the background image and position of a visual element. The query docu is really poor, there is literally nothing: ...
Roman's user avatar
  • 151