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
16 votes
1 answer
6k views

I am starting to work on optimization for my app. I need to understand the information Unity displays about file sizes. For example, just to prove a point, here is a 2.2 KB completely blank PNG which ...
mike's user avatar
  • 501
13 votes
1 answer
80k views

I'm making a small game for the first time and enjoying it thus far. The only thing that keeps bothering me is that I can't find a human explanation of what the graphic raycaster does. What's the ...
CaptainCarl's user avatar
11 votes
1 answer
3k views

Here's what I want: Here's what I got: What is this procedural image unmasking called? Popcap didn't do image-splitting (source images below), but I feel like I'm missing the obvious here. (Source ...
x otikoruk x's user avatar
4 votes
5 answers
2k views

I have an issue with my Unity 5 game. When I click on the Pause button, my character jumps before the game is paused. My script detects the click to trigger the jump jump before the pause button. I ...
Markop's user avatar
  • 86
3 votes
2 answers
2k views

What does this Yellow Outline Represent around Text Mesh Pro Text objects in Unity? I don't see any regarding them in the inspector making it so that I have eye-ball it in the scene view to make it ...
Ultra Gamer's user avatar
3 votes
1 answer
1k views

I am a complete beginner in Unity and, after having search for a while, I am still not sure if it is actually possible to achieve what I would like to do. My goal is to have a game where the screen is ...
Federico Tomasi's user avatar
3 votes
2 answers
1k views

As you may know, Unity can have issues correctly rendering transparent 2D Sprites/Textures exported from Photoshop or Figma. Reason being that most of these tools operate in Gamma color space while ...
Nenad Slavujevic's user avatar
3 votes
1 answer
986 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
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
2 votes
2 answers
14k views

I'm new to Unity and C# and have been struggling to figure out how to solve this. What I'm looking for is a way to make text display whenever a button is selected. (ex. Player selects a difficulty ...
FEZ_R's user avatar
  • 25
2 votes
1 answer
5k views

Hi have created some buttons from sprite and I added image and button components on it. I am just using sprites because In my game the camera can be moved on x and y. But I don't want my button to ...
thirteen4054's user avatar
2 votes
1 answer
115 views

Some weird "ball" is showing when I select an element in Unity, preventing me to see the object itself: I've tried to hide some layers, but even with all layers hidden it's still here: Do you know how ...
Erdal G.'s user avatar
  • 161
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
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
507 views

I'm making the main menu for a small game I'm making, and when I was learning how to make buttons etc. In order to make the buttons have a sound effect when pressed and so on, I was told to add an ...
Kaiannae's user avatar
  • 123
2 votes
1 answer
2k views

I created a custom UI Button: However, when I use the sprite as the image for a button it doesn't fill out the whole "Collision" area: This is an example of how I want it to fill the "...
Motcho's user avatar
  • 23
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
2 votes
2 answers
157 views

I would like to show race progress in my UI. My minimap is like sketch below: Blue dot represents progress and red dot is finish line. I would like this to work in UI so only blue dot would move. If ...
Ivan's user avatar
  • 379
2 votes
2 answers
1k views

Image sprite is created programmatically _image.sprite = Sprite.Create(texture, ...); Should I destroy it before replacing with a new one? P.S. My question comes ...
Serg's user avatar
  • 393
2 votes
1 answer
916 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
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
2 votes
1 answer
7k views

I've been recently working on a videogame, and I'm trying to make a script that will destroy the game object it is applied to whenever the right mouse button is clicked on it. It doesn't function at ...
OKprogrammer's user avatar
2 votes
2 answers
2k views

I have been working with Unity for some time, and I am trying to get a better understand of the UI system. I am a mobile developer and am redesigning the UI but I am unable to achieve what I want. My ...
D4rWiNS's user avatar
  • 303
2 votes
0 answers
651 views

I've already uploaded this question in the Unity forums but only got a response but not an answer or solution. Here's a link to the original post: https://forum.unity.com/threads/emission-material-on-...
Dark Kool's user avatar
1 vote
3 answers
2k views

I have an issue that is driving me crazy. All these lines are 2 in height, but when moving around the screen they change thickness. As you can see the top line is thinner. What can be done to make ...
Majs's user avatar
  • 415
1 vote
2 answers
5k views

As title, I know Button can be triggered onclick by button.onClick.Invoke(); But how to simulate onclick event of Selectable? Thanks for the help.
qwerty's user avatar
  • 11
1 vote
1 answer
74 views

I am trying to make a digital clock (24:00 type), where each number is an individual image, that should change. So, I want to change sprites for multiple images in one piece of code. But when I ...
Ratty's user avatar
  • 13
1 vote
4 answers
2k views

I'm trying to display file names including their directory. When the file path gets too long for the text box, I want to align it right, because the filename is more important than the directory. I ...
Frederik Steinmetz's user avatar
1 vote
1 answer
64 views

Does Unity fire any events when the user clicks these buttons? Or is there a way how to hook up code to respond to these actions?
Magician Artemka's user avatar
1 vote
1 answer
2k views

for some pickable object, I display a UI canvas. It's attached to a scene gameObject. Sometimes the Canvas UI overlaps with some other objects. I need to make sure the UI is always renderer on top of ...
virtouso's user avatar
  • 2,680
1 vote
2 answers
243 views

I have a card game, where I'd like to be able to zoom in on a card if it's right clicked. I coded to make sure that if the zoomed card would go over a screen boundary, instead we would anchor it such ...
Steve P.'s user avatar
  • 123
1 vote
1 answer
1k views

I'm digging into Unity's new UI Toolkit, and so far I like it a lot; but there are a few things bugging me about it. I have a dynamic list in my UI which keeps track of way point paths, and it changes ...
Michael Macha'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
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
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
1 vote
1 answer
4k views

Imagine you'd like to highlight a 3D GameObject by drawing a (translucent) UI panel above it. The UI panel should cover the object exactly. Therefore the object's bounds, as it is seen from the camera,...
SePröbläm's user avatar
1 vote
1 answer
2k views

Within my Unity Project in my code, (see below), I have a button called Check which executes when CheckPress() function is called. I read two approaches by which this can be done. Appraoch 1: Using <...
Tanmayee Pathre's user avatar
1 vote
1 answer
481 views

I was following a tutorial on how to create a dialogue Box in Unity, and in one part of the tutorial the tutor imports UnityEngine.UI and creates an object of type <...
Carolina M's user avatar
1 vote
1 answer
2k views

I'm going to try out the community here once more, I haven't had very good look in the past with getting help. I'm iterating through a series of List() and I'm creating a bar graph and a line graph ...
John Connor's user avatar
1 vote
1 answer
2k views

I'm currently trying a new approach on a Card Game in Unity. To capsuling my Card Prefab i have a root GameObject with the ...
Smartis has left SO again's user avatar
1 vote
1 answer
52 views

I have a prefab with some fixed sizes on itself and its elements: Then added a Aspect Ratio Fitter and a Preferred Height: . When using that prefab from a container with Horizontal Layout Group with ...
Henrique Pombo's user avatar
1 vote
1 answer
291 views

I built my entire game in Unity based on my Android phone resolution, both for UI and object sizes. Now, everything looks good for a 1080 x 2400 resolution, but I know that's not the aspect ratio of ...
Usylom's user avatar
  • 31
1 vote
1 answer
350 views

My canvas scaler does not work when the UI is instantiated dynamically. It does work well in iPhone 6.5 inch simulator: The problem is when I use 5.5 inch or smaller simulator: It does not follow ...
stingalimian galimian's user avatar
1 vote
1 answer
260 views

In Unity UI I have a TextMeshPro Button and some TextMeshPro Text like in the following image: Is there any function in a Tween Library like DOTween that could make the text look like its coming out ...
Stefan's user avatar
  • 117
1 vote
1 answer
835 views

I'm working on a project where I have a main UI (Screen Space - Overlay canvas) and various game objects that have little popups above them (World Space canvas) that the player should be able to click ...
Mason Wheeler's user avatar
1 vote
0 answers
55 views

I have a UI Document on a gameobject. while hovering on a UI button when i press mouse 4 on my logitech g502 it gives me an error. I did this by accident when i pressed mouse 4 instead of left ...
user25832's user avatar
  • 123
1 vote
2 answers
3k views

Been struggling with this one for a while. I've found a few other posts across Stack Exchange and the Unity forums that seem to have the same problem, but their solutions don't work for me (at least ...
rpatton583's user avatar
1 vote
0 answers
617 views

I am making a unity mobile game, I have a simple scene and a canvas with a few buttons and these buttons have scripts that detect if the button was pressed and released. Here is the code for doing ...
zmac's user avatar
  • 11
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

1
2 3 4 5