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
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
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
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
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
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
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
1 vote
1 answer
747 views

I am trying to implement my own runtime color picker that's easy to use for touch interfaces. I want the hue slider to be a ring, along these lines, except the whole ring texture would rotate when ...
arcadeperfect's user avatar
1 vote
0 answers
3k views

I'd like to listen to orientation change events, so for example my UI layout or the components themselves can be changed. All I've found is that I should check the value of ...
Tudvari's user avatar
  • 801
1 vote
1 answer
2k views

I want to instantiate a prefab at the mouse position in the editor. All the answers I found till now are for instatiate a prefab at runtime but i want to instantiate in the editor. Currently I am ...
LionCatDev Studio's user avatar
1 vote
0 answers
299 views

I have created UI text object And then created Text field in behavior class: ...
Dims's user avatar
  • 161
1 vote
0 answers
50 views

So, I'm piecing together a nutrition-helper that's mostly a catalog, some lists, and a calculator. I'm using Unity C#, an xml deserializer, and building to the android platform. The xml deserializer ...
ScumSprocket's user avatar
1 vote
0 answers
2k views

I have some RectTransform on Unity UI. I have already implemented some Zoom functionality but now I need it to zoom to the area where the mouse cursor is located. Currently, it zooms to the anchor ...
Random generalist's user avatar
0 votes
3 answers
13k views

Unity text is very blurry. How can I fix it? To be honest, I have no idea why it behaves this way: Hope that someone faced the same problem and will be able to share how it was tackled.
some1 here'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
458 views

In the latest Unity editor 2021.3.25f1 LTS, I'm trying to directly import the following package from github: https://github.com/yasirkula/UnityNativeFilePicker/releases/tag/v1.3.0 But when I import ...
tribbloid's user avatar
  • 131
0 votes
2 answers
5k views

I currently use Unity gizmos for many debugging purposes, but I'd like almost all of them to be visible to the player in-game (when the game is built). For example, when a player is dragging to place ...
caleidon's user avatar
  • 591
0 votes
2 answers
183 views

My character jumps when I press the right side of screen. The pause button is alsp in the top right corner. So when I press that button, the right side script always triggers and I don't want that to ...
YouCanCallMe Syarif's user avatar
0 votes
2 answers
2k views

What are good approaches for disabling user input during certain moments in a game? In my case, I have a grid-based tactics game (kind of like Fire Emblem) where I periodically want to toggle the user'...
ineedahero's user avatar
0 votes
2 answers
87 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
0 votes
1 answer
550 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
134 views

I am writing the code for my button, but it's giving me errors like this: Assets\Scripts\SteamIntegration.cs (60, 6): 'Button' is not an attribute class Where did I make a mistake in this code? <...
Syeda Aqsa Sakina's user avatar
0 votes
1 answer
1k views

I'm trying to create an endless runner type game where once the player dies, a popup opens letting the user know that the player can be saved by watching an ad. This is how the popup looks in the game ...
single arrow games's user avatar
0 votes
1 answer
143 views

I have a vertical layout group filled with UI buttons used as menus in my game. They work well for mousing over and clicking, and I am in the process of adding keyboard controls. The issue I have is ...
Hoog's user avatar
  • 121
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
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
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
4 answers
2k views

It seems like Unity has disabled UI interaction while the cursor is locked, which is frustrating because the store in my game is an actual in-world one, and thus means the player has to look at the ...
AriaMath's user avatar
0 votes
2 answers
2k views

I am trying to wrap my head around the concept of the Canvas in Unity and its many uses especially outside of user interfaces. However, I cannot really find a good tutorial that digs deep enough into ...
Gergely Kovacs's user avatar
0 votes
1 answer
2k views

I have a method that fades the screen to black, then fades away back again using coroutines but I couldn't get the 2nd part to work. FadeToBlack() works if I put <...
lover of the feet's user avatar
0 votes
1 answer
1k views

I'd like Unity to get a specific button with: GetComponent<Button>().interactable But how do I get a specific button with a name?
PWalkersCrisps's user avatar
0 votes
1 answer
721 views

So, say you've started a new project. You drop your in desired sprite. You can see how big it is relative to the Main Camera. That's cool. Now you want to add a persistent bit of UI to the game, so ...
Shane's user avatar
  • 101
0 votes
1 answer
3k views

In my game, I assigned all of the blocks to be 2D sprites so that they could be easily converted into prefabs: However, when designing the drag and drop scripts, I noticed that all of the drag and ...
kayra yorulmaz's user avatar
0 votes
2 answers
4k views

I have a public method public void patreononclick(){ Application.OpenURL("http://www.patreon.com/HubakaGs"); } This is supposed to open my Patreon ...
Hubaka Gs's user avatar
0 votes
1 answer
232 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
1 answer
165 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
54 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
2 answers
64 views

This is my code ...
Alejandro's user avatar
0 votes
1 answer
94 views

My existing code for this task is: ...
Mfa Xyz's user avatar
  • 11
0 votes
2 answers
664 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
1 answer
1k 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
2 answers
201 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
0 votes
1 answer
148 views

Is it possible to arrange alternate children separately in a vertical layout group? I want to arrange the child elements so that one is aligned to the left, the next one is aligned to the right, and ...
fatdrogen's user avatar
  • 248
0 votes
1 answer
677 views

I recreated the problem in a new project to check and test the problem, but I don't understand it. Two scenes: First scene A GameObject with this script that simply jumps to the second scene. ...
Baro's user avatar
  • 81
0 votes
1 answer
67 views

I have a UIManager meant to control the UI. The UI manager is attached to an empty game object. The Canvas has three panels, ...
Tim W Glass's user avatar
0 votes
1 answer
310 views

I have a custom UI element and I would like to instantiate it from Hierarchy like you do with any other UI element (button, text etc.). I know how to do this so it is instantiated in the scene but how ...
Ivan's user avatar
  • 379
0 votes
1 answer
1k views

I've tried quite a few things, but none of them have worked reliably. Here is what I'm currently using: ...
THE JOATMON's user avatar
0 votes
1 answer
698 views

This happens to all particle systems. I tried: Changing the rendering mode to camera, setting culling mask to UI, particle system layer set to UI Adding a canvas child, and attaching a particle ...
Alex's user avatar
  • 103
0 votes
1 answer
135 views

I got the following question: How to show an image as Tooltip in a Unity3D? The image should only be visible if the user hovers over the 3d object. Thanks in advance, hidayah
Hidayah__0111's user avatar
0 votes
1 answer
85 views

I have written a code that would create background image as a button and then show a letter on that button. This should become a virtual keyboard. I am experiencing weird drawing that looks like this: ...
tmighty's user avatar
  • 919
0 votes
1 answer
2k views

Currently, I am scrolling a UI RawImage using the following: ...
PayasoPrince's user avatar