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
27 views

Why does a numeric input field appear in my Unity event when it doesn't in the tutorial?

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
14 views

Selection Box Not Positioning Correctly

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
0 votes
0 answers
28 views

How can I use `UnityEngine.UIElements.PopupWindow` for a custom PropertyDrawer targeting an array with UI Toolkit?

I'm following the "Create a Custom Inspector" car and tire example that Unity has in their documentation for UI Toolkit, but I'm trying to modify it in a specific way and I'm coming up short ...
NJJ_002's user avatar
  • 47
2 votes
2 answers
62 views

How would I make minimap of racing track where dot follows track progress in Unity?

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
  • 339
0 votes
0 answers
23 views

UI Button is not working

I have a problem on the canvas. When I remove the camera in the FPS Controller player and UnChecked the FPS Controller it works but when the Camera is inside the the FPS Controller I can't click ...
Christian James Calambro's user avatar
0 votes
1 answer
48 views

is it possible to render world space canvas over other objects in unity?

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,628
0 votes
1 answer
43 views

Image over everything Unity

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
36 views

Unity LookAt says reference not set but it is

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

Add round edges to heptagon shaped image with fill in Unity

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
  • 339
0 votes
0 answers
77 views

Buttons in a scroll view not working

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
0 votes
0 answers
37 views

Why do my shaders render differently in the simulator?

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
31 views

3D object blinks in and out of visibility through canvas

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
35 views

Why do Unity UI toggle groups update *after* the default time in Execution Order settings?

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

Unity Canvas on Quad blocking mouse click sometimes?

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

How to manage UI sound effects?

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
  • 113
0 votes
1 answer
51 views

How to get value of transitionDuration in C# for Unity UI Toolkit

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

Using an InputField to enter a distance and then move an object to a location based on the input: object returns to old position

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
160 views

Unity UI Buttons not working (not clickable)

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
16 views

Unity UI Image sprite (stretch) tiles when assigned from Texture2D at runtime (?)

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
18 views

Unity UI Builder InvalidCastException

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
0 answers
27 views

How to display puzzle pieces within the UI panel upon the initial generation

...
hansueyuu's user avatar
0 votes
1 answer
62 views

UIElement button does not work when clicked

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
30 views

Fade-in sprite in TextMeshPro

...
Nader Amir's user avatar
0 votes
0 answers
39 views

Javascript global variable doesn't update

Here is the scenario, I have a GetImageAerial.jslib which has function something like this ...
Suriya Swami's user avatar
0 votes
1 answer
91 views

Canvas that should only be visible for local player is also visible for remote players

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
53 views

Is it possible to prevent a graphic raycaster blocking 2D rays in different layers, from a different camera?

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
42 views

Add a controls instruction overlay to game HUD

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
290 views

How can I instantiate a prefab in a canvas and have it positioned relative to its parent?

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
168 views

Unity debug error “Frame not in module”

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
265 views

Adding text label to sprite

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
249 views

Clicking UI button calls event twice

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
106 views

Why can't I press buttons after re-enabling the UIDocument?

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
114 views

How to remove loading delay when loading from Appdata? Or to load everything at start?

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
0 answers
50 views

Enable socket interactor only when previous sockets are occupied

There are 3 boxes and 3 socket interactors. I only want the second socket interactor to work when there is a box in socket one and the third to work when there is a box in the first and the second ...
SPP's user avatar
  • 1
0 votes
0 answers
114 views

How to prevent transparent world UI elements from hiding post processing?

I have transparent world ui elements in my game like so: What I've been noticing is that post processing through transparent elements is nonexistent, even though other parts of the scene work with ...
Elon-Musk-YAY's user avatar
-1 votes
1 answer
192 views

unity onTriggerEnter does not work

so in here there is a box to which i have attaches this script and ATTACH1 is a socket interactor here i want is when the box which i have attaches attaches to that socket interactor the text which is ...
SPP's user avatar
  • 1
0 votes
0 answers
24 views

Input while using Input System and Unity UI [duplicate]

I'm using Input System and Unity UI and the problem I have is a single event (i.e. mouse press) is being sent to both systems. Here are a few interactions to demonstrate the problem. Clicking on a UI ...
stripies's user avatar
0 votes
1 answer
62 views

"Button is not an attribute class" error when integrating Steam achievements

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
0 answers
89 views

How to adjust resolution to display only in portrait mode for both phones and tablet devices?

I am facing an issue where I'm able to adjust the resolution for different phones like Android and iOS but not for tablet devices. Is there any way to set it, for all kinds of devices, to display only ...
Mohammed Rilwan Ibrahim's user avatar
0 votes
0 answers
29 views

How to update other players after adding a character to the text UI

Hello I'm new to multiplayer development and I'm using photon pun 2 in Unity engine C# language. How can I update other players every-time I add another character to my text UI. The characters that ...
Ryan Cat's user avatar
0 votes
1 answer
77 views

How to alternate child placement to the left and right in a vertical stack?

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
  • 238
1 vote
2 answers
1k views

Interacting with World Space UI

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
0 votes
1 answer
306 views

When switching between two scenes: MissingReferenceException: The object of type '...' has been destroyed but you are still trying to access it

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
245 views

Why doesn't RectTransform.GetWorldCorners() employ any camera?

Typically, conversion methods from world to screen coordinates and vice versa use a camera to perform these calculations, so I'm wondering how does GetWorldCorners ...
Serg's user avatar
  • 383
0 votes
1 answer
39 views

3rd Button on UI Seems to not Register the onClick.AddListener()

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
2 answers
147 views

how can I make dropdown elements unselectable, but can visible?

this is basic dropdown Ui object I want to make it ,if I click dropdown, show every elements but can only select top element others not. like this image, because I made tutorial. how can I restrict ...
Byungheon Lee's user avatar
0 votes
0 answers
29 views

weird white outline on dropdown menu in unity

I have a dropdown and whenever I click it, this happens: How do I get rid of these outlines? It seems to be caused by the dropdown object that gets spawned not letting you set the background color ...
Wijiler's user avatar
0 votes
1 answer
418 views

How to hide UI elements in Unity?

I'd like to ask a case when developing a game using Unity. There are many UI elements in the game. These UI elements normally disappear from scenes when the purpose is achieved. However, the ...
Byungheon Lee's user avatar
0 votes
0 answers
61 views

OnPointer events trigger when entering transform, not on custom collider

I want to create a custom UI, specifically an action wheel which offers different actions depending on where or what was clicked. To do that, I create circle segments (slices). I also create a custom <...
ElDuderino's user avatar
0 votes
0 answers
195 views

USS class color background not functional

Dealing with UI Builder for created interface button, I need to change properties background color with uss class stylesheet. I created a class stylesheet .buttonControl which drag'n drop into button ...
miltone's user avatar
  • 101

1
2 3 4 5