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.
222 questions
0
votes
0
answers
72
views
World Canvas InputField cursor precision/control from RenderTexture output in Overlay UI
How do you have a world canvas input field cursor be controllable from the input being mapped from a UI overlay with its raw image supplied from render texture from a render camera?
Described another ...
0
votes
1
answer
249
views
Determine which button is at specific coordinates
I am implementing a weapon wheel in Unity and I have most of it all worked out, but am struggling with one issue:
My weapon wheel looks a bit like this one (example only):
And mine is for something ...
0
votes
1
answer
998
views
GameObject.Find() can't find object after loading the scene
I have 2 scenes in my project, MainMenu and Game.
MainMenu scene contains 2 buttons, 'Hide Black' and 'Hide White'. Game scene contains 2 panels, 'Black' and 'White'. When the user clicks any of ...
0
votes
1
answer
1k
views
How to get the fingerID (Touch) that is pressing a specific UI button. (Unity)
I want to displace a button along with the screen position that is pressing on it.
However, having multiple touches at the same time results in wanky behaviour.
So I want to limit the button's ...
0
votes
1
answer
100
views
Monobehaviour script method does not appear as an option for UI button's On Click
I have the following script, and when I try to use a UI button to call the CheckGuess method, it does not appear as an option:
...
0
votes
1
answer
225
views
Clickable videos in unity
My sister is working on a visual novel. We wanted to use unity to build it. She wants to have videos with clickable buttons to skip to other scenes. The problem is we both are noobs! Do you guys have ...
0
votes
1
answer
673
views
Unity UI Objects edges are not smooth
I have this Unity UI Image placeholder and here is the snapshot
As you can see its edges are not smooth. First I thought this is editor problem but after making the build it remains the same. What i ...
1
vote
0
answers
50
views
How to access List<T> items dring runtime? Where does this data go, and how can I use it? (I think this is a "fundamentals" thing)
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 ...
1
vote
1
answer
832
views
OnPointerDown / OnPointerUp aren't working in world-space canvases
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 ...
0
votes
1
answer
2k
views
How to raycast from a UI element
How do I raycast from a UI object?
I have tried
Ray ray;
Camera cam;
Transform obj; //UI object
ray = cam.ViewportPointToRay(obj.position);
AND
...
3
votes
2
answers
2k
views
What does this Yellow Outline represent in Unity Text Mesh Pro?
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 ...
2
votes
1
answer
5k
views
Sprite button not triggering "On Click()" event
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 ...
0
votes
1
answer
43
views
How do I link a GameObject activated state to a UI button being held?
How do I go about this functionality: When a user taps and still holds onto a UI button, a GameObject will be set active, when they release the UI button, the GameObject will be deactivated.
2
votes
1
answer
115
views
Ball always showing in Unity
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 ...
1
vote
0
answers
2k
views
How to zoom image on Unity UI to particular point where mouse cursor is located?
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 ...
0
votes
0
answers
2k
views
Don't Render always on top Unity world space canvas UI
I have a World Space Canvas where I have a text object which is always rendering on top. I checked that it has UI/Default Shader attach. Is there any way available ...
2
votes
2
answers
2k
views
Understanding Unity-UI Layout Element - Mininum and Preferred Size
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 ...
0
votes
2
answers
4k
views
Button to call Application.OpenURL not working
I have a public method
public void patreononclick(){
Application.OpenURL("http://www.patreon.com/HubakaGs");
}
This is supposed to open my Patreon ...
-2
votes
2
answers
2k
views
C# syntax for "This button is interactable"?
What should be the C# syntax for the condition if (This Button is interactable)?
I have a script attached to the button, Which has to run only if the button is interactable.
Thank you in advance!
1
vote
1
answer
2k
views
Overuse of Canvas in Unity3D
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 ...
4
votes
5
answers
2k
views
Clicking pause button makes character jump before pausing
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 ...
13
votes
1
answer
80k
views
How does the Graphic Raycaster component work in Unity?
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 ...