I built a registration form for a mobile game using Unity 5.1.
To do that, I use Unity UI components: ScrollRect + Autolayout (Vertical layout) + Text (labels) + Input Field.
This part works fine.
But, when keyboard is opened, the selected field is…
I have a UI Canvas with render mode world space set. For all UI elements that belong to this canvas, I am seeing 'left', 'right', 'top' and 'bottom' variables in the RectTransform component in the editor. Any ways to access these variables via code?…
I'm trying to get a text inside an inputField in Unity3D with C#.
I've placed an inputField in my editor, renamed and tagged in: Username_field.
My question is: How i can get the text inside the InputField Username_field in a C# script?
I'm trying to attach an onValueChanged event to my GUI Slider, but for some reason it gives me a mandatory option to put a value in (it's the fourth box in the "On Value Change (Single)" section). Then it only sends the forementioned value, not the…
Is it possible to extend the new unity ui components like for example the transform component? Because nothing happens when i try to extend the button, instead of the transform component
using UnityEditor;
using…
I'm trying to interact with world space UI using a first person controller when Cursor.lockState is set to CursorLockMode.Locked.
world space UI and a character
But when cursor is locked, cursor position is set to (-1, -1),
which is told from the…
I have a 2D game set to 1080p pixel size (so each unit equals 1 pixel) and I have added a canvas to my scene. However the canvas fills only about 1/8th of the screen and is also not central either. All the canvas size and position settings are…
When I run the following code on my UI text
Color color = text.color;
color.a -= 1.0f;
text.color = color;
The alpha value of the text is immediately set to 0. How can I simply fade out the text.
Everything I search is based on the old UI.
I've tried the following
button.image = Resource.Load("...");
button.GetComponent() = Resources.Load("....");
button.GetComponent
I am developing a game using unity3D and I need help making a progress time bar such that on collecting particular items time is added and thus the game continues.
How I can remove border for input field? Or can i make it invisible, change color? I have not found the answer to this question in Google. I tried to change the border color in the Inspector, but it did not. Help me, please.
I asked this question in a few places, and still haven't figured it out completely yet, so maybe some smart people here will have an idea how to approach that.
What's the best way of maintaining a deep nested hierarchy of prefabs in a project? Say,…
My problem is how to share same GUI in multiple scenes.
For example:
I have Inventory GUI on Farm scene and I need this GUI on other scenes like Castle, Dungeon etc.
It's good idea to make prefab of Canvas? Or design again the GUI? What about mixing…
I am able to detect collision between UI components and a gameobject if my canvas is rendered in the world space. Here, I am trying to find collision between two UI elements (say UI buttons) when the canvas render mode is screen space overlay.
I…