Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >

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
1 vote
1 answer
45 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
71 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
0 votes
2 answers
86 views

I have this function that spawns an Icon from a world position and animates it to correct UI position. In editor it works fine but in apk on phone it has a wrong starting position. Now as I understand ...
Ivan's user avatar
  • 379
-1 votes
1 answer
68 views

In the editor, it does not matter if I set the resolution in the game view to my pc resolution (1920x1080) or to "Free Aspect". The only thing that changes is that in "Free Aspect",...
Daniel Lip's user avatar
  • 1,785
0 votes
1 answer
219 views

Here is what I want to achieve, health bars that stay perfectly above the units, regardless of where the unit moves or where the camera is: https://www.youtube.com/live/fZSaPDz-GJc?si=B868wwF5KAPCuEtw&...
Pascal Claes's user avatar
0 votes
0 answers
31 views

I tried to code an image to follow the character using canvas but it jerks when moving. Is this a bug? Do you have any solution to fix it? https://youtu.be/OnT9Pabgi2g ...
QChí Nguyễn's user avatar
0 votes
2 answers
137 views

How can I highlight only specific parts of an image in Unity? My image would be something like the example below: a grid with text and fields. Text can be separated, but I would prefer it be part of ...
Ivan's user avatar
  • 379
0 votes
0 answers
49 views

I'm making UI that's using controller support, and therefore I have to script it and use an Animation, but how do I make sure that a color change when hovering over a button happens instantly, because ...
Hilmir Snær's user avatar
0 votes
1 answer
62 views

I am fairly new to Unity. I want to create a VR project that I build to WebXR and publish to the web. I am using the sample scene from this project and it helps me get up and running. I am able to ...
Bernie2436's user avatar
0 votes
0 answers
56 views

I'm developing a board game in Unity and facing an issue with image clarity. The board consists of multiple nodes, each displaying a 480x600 px image. However, these images appear blurry and ...
Sanchit Singhal's user avatar
0 votes
1 answer
162 views

I am placing a 3D game object with a SpriteRenderer + Billboard attached to it in my scene. However, since it's a distance away from a perspective camera, the sprite gets scaled, losing a lot of the ...
PayasoPrince's user avatar
0 votes
1 answer
53 views

My Unity game has graphics designed for aspect ratios of 16:9, 16:10, 4:3, 3:2, and 19.5:9. This worked for mobile. But now I want to create a PC version for Steam, and I have to deal with the user ...
donut's user avatar
  • 111
0 votes
0 answers
53 views

So i want to design an editor which has the following requirements. Suppose i already have a prefab called Player.prefab and script attached as Player.cs And have a scriptable object called ...
Aman's user avatar
  • 1
1 vote
1 answer
269 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
0 votes
0 answers
179 views

I’m working with Unity’s UI Toolkit and trying to implement a popup window that appears when clicking a menu button. The expected behavior is that when I click the menu button, a popup window with ...
Corvus Ultima's user avatar
0 votes
0 answers
75 views

I have a game with several scenes, all loaded using addressables: A persistent scene that stays loaded with things like the main camera and certain common game systems. A lobby scene A game scene ...
Programmer9000'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
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
0 votes
1 answer
85 views

I am currently developing a 2D game in Unity, and I'm having an issue with moving coins to a specific position in the UI Canvas when they are spawned. I want the coins to animate from their spawn ...
Javier Triviño's user avatar
0 votes
0 answers
28 views

So i was following this tutorial https://youtu.be/lF26yGJbsQk to make a start button for my unity game. But some how the button is not working and don't know why?
Krushn-a's user avatar
0 votes
1 answer
92 views

I am working on persistence and have an issue where a counter is not persisting across scenes and runtimes. I have a counter, and it goes up in on scene, but does not show changes when going to other ...
Linedol trainer channel gammin's user avatar
0 votes
1 answer
49 views

I was making a game main menu by watching a video online. In that video, while setting the volume Slider, after adding the coded script in the On Value Changed section and selecting ...
Volkan AKDAG's user avatar
0 votes
1 answer
56 views

I found some code that generates a selection box, but when I tried it the box was not starting where the mouse was and I couldn't find the issue. ...
PizzaLvr49's user avatar
2 votes
2 answers
155 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
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
0 votes
1 answer
133 views

I want to create a UI for a VR game to use it as a loading screen, the scene has a camera an image, a text mesh and a loading icon, the image is the background and the text and loading icon should be ...
Alejandro's user avatar
0 votes
2 answers
64 views

This is my code ...
Alejandro's user avatar
0 votes
2 answers
163 views

I am not sure if this is possible I have this image: This is how it looks when I do radial fill: My question is if there is a way to make edges rounded while filling the image. Rough sketch of what ...
Ivan's user avatar
  • 379
0 votes
0 answers
282 views

I have created a scroll view in Unity, and wanted to make the elements inside clickable. It would function as a level select menu. The level panels are instantiated from a prefab. As a first approach ...
CheckerT's user avatar
  • 176
0 votes
0 answers
57 views

I am using simple shaders on the cards in my game. The shader is assigned as a material to a white image the covers the whole card. They render as intended in the scene view, but do not in IOS ...
Devin's user avatar
  • 1
0 votes
0 answers
54 views

In the Menu scene I have canvas with buttons and some 3D objects that are visible in camera's view. However one object - "the red prompt Arrow" is jumping in and out of visibility. Like here ...
NationalGeographicProgrammer's user avatar
0 votes
0 answers
71 views

Why is toggle group after default time in the default script execution order in Unity?
ina's user avatar
  • 294
0 votes
1 answer
85 views

I'm working on a card game that has quads with world space canvases on them. I've been using OnMouseOver() and ...
Gage Adam's user avatar
2 votes
1 answer
480 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
0 votes
1 answer
90 views

My existing code for this task is: ...
Mfa Xyz's user avatar
  • 11
0 votes
1 answer
96 views

I have attached a script (1) to the InputField for ease and it displays HA changing when I alter it during run time in the ...
Stan's user avatar
  • 3
0 votes
2 answers
644 views

Buttons Easy, Medium and Hard can not be clicked even though Restart Button was clickable from the start. All of the buttons have interactable checkbox on and raycast target on. Shadow panels and ...
Pablo Frank's user avatar
0 votes
0 answers
35 views

For some reason a Unity UI Image that is set to stretch becomes tiled when assigned from Texture2D at runtime (?)
ina's user avatar
  • 294
0 votes
1 answer
42 views

I am making a custom UI with the UI Builder for my scriptable object that holds some data for the AI Player. It all worked fine until I added a third slider for a new value I needed; now the object ...
Džoni's user avatar
  • 36
0 votes
1 answer
187 views

I have a small issue with my UI. Whenever I click a button on my pause menu ui nothing happens even when I hover over the buttons. However, in my main menu scene, the UI works without any problems. ...
Miracle's user avatar
  • 33
0 votes
1 answer
67 views

...
Nader Amir's user avatar
0 votes
1 answer
242 views

I'm using Unity NetCode for Game Objects. I have a player Prefab, inside it I have a canvas as a child of my player Prefab (I don't know if it's the best approach), which contains inventory, status, ...
Jamelaumn's user avatar
0 votes
0 answers
156 views

I have a graphic raycaster attached to a canvas, with the blocking layer set to exclude all layers except "UI": ...
arcadeperfect's user avatar
0 votes
0 answers
93 views

I was wondering how I could make an instruction panel for the users of my game in Unity. I will add a photo to this post that shows an instruction panel. Any explanations would be much appreciated!
Cezar P's user avatar
  • 45
0 votes
1 answer
998 views

I am trying to load, at run time, a UI prefab and have that display on a canvas. I was following the directions found on this forum. I am able to get it to load and display, but it is not showing up ...
tatmanblue's user avatar
0 votes
1 answer
332 views

I'm creating a 2D game, and all my game layers are UI canvases. Here's the issue: during debugging, every time I click on the screen, Visual Studio stops and displays "Frame not in module," ...
Alisa's user avatar
  • 1
0 votes
2 answers
812 views

I'm completely new to Unity. I'm trying to create something similar to Scrabble. I've simply got a tile as a sprite (red arrow).Firstly, I don't understand it being so small.. I'm trying to give the ...
Kingsley Obeng's user avatar
0 votes
1 answer
544 views

I've designed a game where, when a button is clicked, the moving point stops. If the button is clicked again, the moving point starts moving again. I only click on the button once, but the ...
Alisa's user avatar
  • 1
0 votes
1 answer
190 views

I have this UI with buttons that should be clickable whenever the UIDocument is enabled, but for some reason whenever I disable and then re-enable the UIDocument (in the second code block), the ...
skundu's user avatar
  • 1
0 votes
2 answers
197 views

Currently, when loading from Appdata, there is a noticeable delay. See a sample video here, when it changes from the sprite set in UI to the sprite loaded from Appdata through C# script. I want to ...
Junjie J2's user avatar

1
2 3 4 5