Graphical User Interface. A term used to describe the tools available to the player to interact with the game.

learn more… | top users | synonyms (1)

3
votes
1answer
77 views

Dragging text element into Text variable unity 4.6

So I was trying to make a UI element to keep score in a unity (4.6) project and I'm having trouble assigning the 'Text' element to the Text variable. So I have the text element with the script ...
1
vote
0answers
19 views

Unity Event after Layout update but before OnWillRenderObject()

Looking for subscribe-able event that occurs right after Layout update in Unity but before OnWillRenderObject is called. Working solution is Canvas.willRenderCanvases, but useful to know if more ...
0
votes
1answer
43 views

LibGDX Textfield - Text Overflow - Not Wrapping

In my app's registration screen, the textfield is not wrapping text as I expected. Notice in the above image, the email field is not containing the text. I have set the size of the textfield using ...
2
votes
2answers
213 views

How do mobile games create simple UI components?

How are simple UI inputs typically handled in 2D mobile games? For example, text input boxes and keyboards. It seems that many game engines do always have simple UI components. There are obvious ...
0
votes
0answers
44 views

How to ignore Pointer Exit event when click on the UI object?

When pointer enters, it calls a function that make a Boolean true. When it exits, it makes the Boolean false. But when I click on the UI object it calls Pointer Exit for very small amount of time(low ...
2
votes
1answer
632 views

Unity Grid Layout causing multiple draw calls

We are developing a game in Unity 4.6.6 for both Android and iOS. Currently I am building the game UI with the new Unity UI system. In particular I am building a button list to create kind of ...
2
votes
1answer
133 views

Why are these unity UI buttons only responding to the top half?

I'm instantiating UI objects with buttons on them into a scrollrect. For some reason, all of the buttons will ignore their bottom half with the exception of the last prefab instantiated. Below is a ...
1
vote
1answer
182 views

UI Text Won't Change Color in Unity 5

In Unity 5 on Windows 10, I try to change the text color from the Inspector and in scripts, but the color won't change. Here are some screenshots of my Text objects open in the inspector, with there ...
2
votes
2answers
18k views

How to add a UI Text for keeping Score in Unity 5

My Problem is simple I want to show scores on my game. The examples on internet are good but in Unity 5 there are no GUI elements but instead these are now UI elements. I was following this example: ...
1
vote
3answers
429 views

UNITY : I want to make my UI text fade in after 5 seconds

I know this question has been asked and asked but none of the topics i visited gave me an answer. I'm making a game programmed in c# where you control a boat and i want my UI to appear smoothly by ...
1
vote
1answer
197 views

Unity UI Button not working on PC build but working on Android mobile build

I am using Unity to build a game that is going to be used on PC and on mobile devices also. The problem I have is that when I use Unity UI Button, on mobile (android) is working perfectly but on PC ...
1
vote
1answer
484 views

NGUI Texture Background Font of Sprite

I am new to Game Development and using NGUI plugin free version. There are few sprite images in my game. I made them prefab and instantiated at runtime. then I created NGUI Texture and Made it ...
0
votes
1answer
197 views

Draw GUI.Button on certain position on a scrollable background

Problem is in a 2D game I have a large background around 2 screens wide. And on there I got 4 buttons placed on top of background all over complete width. Now when I swipe of move my mouse around I ...
0
votes
0answers
21 views

Animations and timed events in a UI

I'm making a GUI framework for my game and I want to add animations. For example when a textbox appears, it can fade in and scale up to size. I want to give the framework user the ability to combine ...
0
votes
0answers
20 views

Unity alpha of all parented canvas groups

I'm codin aberration effect for Unity UI. It's works great, but I wish to control aberration intensity via rendered object's alpha. So for example if i have parented canvas group with alpha 0.5 I ...
0
votes
1answer
16 views

Touchpad Unity UI

For my Unity game, I want a touch surface (UI Panel). I started implementing a MonoBehavious that should handle touch-started, touch-ended, touch-moved/dragged and double-tap with custom methods. I ...
7
votes
1answer
171 views

Custom Editor - keep default look but add more

What I would like to know is if there is a easy way using OnInspectorGUI, to replace the inspector with one that includes just one or two additional fields (so that it looks identical to the non-...
1
vote
1answer
127 views

How do I duplicate the functionality of ugui's onClick (button component) in inspector (Unity)?

I'm trying to create the same functionality that occurs when you are working with a button in uGui in Unity. I know that I have to create a custom inspector, but i'm not sure where to go from there. ...
3
votes
1answer
110 views

Function, that is searching for nearest enemy Transform only works sporadically. What am I doing wrong?

so I am trying to implement a "Zelda"- or "Dark Souls"-like z-targeting system. You'll see in the code, that the function compiles a list of every enemy in the current scene. I'm still in the ...
0
votes
1answer
87 views

Collision between UI element and GameObject

When I first started to develop in Unity I followed the Unity Tutorial for the Space Shooter 2D game and used the knowledge from that to create something myself. Looking at it now it may not have been ...
0
votes
1answer
45 views

Text field is null while running but not in inspector

I've encountered a strange problem. In my game I have a prefab called UiManager. It has two public Text-fields, one for score, and one for lives. I only have one instance of this prefab and I've ...
0
votes
1answer
65 views

A panel to change 3d object properties when right click on it (Unity)

I'm building a UI system to edit selected 3D objects. I have spheres on the screen and I want to be able to edit their proprieties (radius for example). In order to do that I want the user to be able ...
0
votes
3answers
35 views

Unity - Accessing a UI's text through a Transform

I have this in my player's component list. The HungerTarget transform is the text box in the UI canvas. How would I change the UI's text here? using UnityEngine; using System.Collections; public ...
0
votes
1answer
34 views

How can I use web browser controls for non-browser game GUI?

I'm looking for a way to get a modern browser's level of customization and rendering quality in my c# monogame to avoid using roundabout/limited/buggy GUI toolkits and to get better fonts without ...
1
vote
1answer
299 views

Raycast, UI and Update Question

I have movable objects in a scene. When Raycast hits an object, I have a hovering UI that moves to a retaliative distance from the hit object. When the object is dragged, the UI's position is moved ...
1
vote
0answers
38 views

How to reset RectTransform's position?

So, I am trying to make a simple GUI Instantiate system. The GUI is going to spawn successfully, but the position is wrong. Position : (Left, Right: 249.8423 ; Top, Bottom : 400) Anchors : (Min: X:...
2
votes
1answer
229 views

How to Reciprocally draw on a 3D mesh and 2D UI Image in Unity?

My question is a bit involved so I'm going to split it into parts and attach a picture. 1) In Unity I'd like to be able to draw a line on a 3D worldspace mesh with the mouse. 2) As I'm drawing on ...
4
votes
2answers
346 views

In Unity, how do I handle very short mouse drags as click events?

I am trying to recreate a UI menu that has functionality similar to the iPhone's home screen: If a user drags anywhere on the menu (including on a button), it should drag the whole page left/right ...
1
vote
2answers
2k views

How do I create a message box that fires a callback on button press?

I need to create a message box with an "OK"-button. When the user touches the button, it should execute a callback. I'm new to this and couldn't find any articles in the docs.
0
votes
1answer
52 views

Prevent button layout changing after one is removed?

I have a layout with four buttons in it. I end up removing one of the buttons using: View v = (View) findViewById(R.id.ViewId); ((ViewManager) v.getParent()).removeView(v); The ...
0
votes
1answer
21 views

How to get which gameobject the mouse is over in Unity?

So I'm working on a simple drag-n-drop based trading card game for my own amusement. There is a card inspector included. What I want to achieve is to change values in the inspector (which has its ...
0
votes
0answers
52 views

Unity Mask shows black content in world space canvas (Vuforia)

So I've built my scroll rect, like this reference tells me to do : http://docs.unity3d.com/Manual/script-ScrollRect.html -> Scroll View (Rect Transform with scroll rect attached) ---> Viewport (...
2
votes
0answers
48 views

Optimise Gear-VR text rendering with Unity

I have a problem with my text being always kind of broken, so there are just some parts of the text visible (parts of letters) and the text flickers a lot. At the moment I have this text 2D-UI text ...
1
vote
3answers
299 views

how to handle interactive choice in the middle of the game loop?

I am programming a turn-based game, 2D tile-based, overhead view. I have an update function and a render function running in separate threads. When it's the player's turn, the player can e.g. ...
1
vote
2answers
2k views

Simple heart container script for 2D game (Unity)?

I'm attempting to create a simple mobile game (C#) that involves a simple three-heart life system. After searching for hours online, many of the solutions use OnGUI (which is apparently horrible for ...
-1
votes
1answer
72 views

Game puzzle pop in java [closed]

I am making a game in Java based of those puzzle popping games. The objective is to select with the mouse and remove a tile. The game i want to build. I have a JPanel and on top, several Components, a ...
2
votes
3answers
1k views

Camera.WorldToScreenPoint not working with perspective

transform.position = Camera.main.WorldToScreenPoint( new Vector3( origin.position.x, origin.position.y, origin.position.z ) ); I have this code on a Unity 4.6 UI object. The origin is some transform ...
1
vote
1answer
34 views

Implementing my own UI sprite class in Unity using shaders: where and how to position the sprites

For learning purposes, I am trying to implement my own UI classes in Unity "from scratch", in the GPU using shaders. I mean, I am trying to use simple 2D sprites either positioned via shaders or ...
0
votes
0answers
10 views

Unity UI - Assigning Event Callbacks Via Script Fails for Objects Instantied by script

So I have a pretty basic tower defense game going on, there are set build points each with their own mini canvas UI for building and upgrading towers. Once you build a tower on them, they disappear ...
2
votes
1answer
141 views

screen space or pixel space for a GUI?

I want to design a very simple GUI for my game using OpenGL. So far, every GUI implementation I have seen uses pixel space coordinates ( x range 0.0 to screen width and y 0.0 to screen height) Why ...
0
votes
1answer
255 views

Can't see instantiated UI element

I'm trying to create a level editor for a 2D game and I wanted to instantiate radio buttons, the backgrounds and numbers of which are determined by the tilesheet I load. I'm sure I'm doing something ...
0
votes
1answer
82 views

How does one structure a Player GUI

I am using Java and the Slick2D library. I've been testing around with ways to develop a Player Graphical User Interface (GUI) (to show armour, items picked up, weapons equipped, etc). The one ...
1
vote
0answers
52 views

How does the Unreal Engine transaction (undo/redo) system work?

I would like the transaction system to handle the create/update/deletion of some custom objects. Then I can proceed as follow: // Create custom object: GEditor->BeginTransaction(FText::FromString(...
16
votes
4answers
53k views

Unity new UI - Dynamically change the functions called by GUI elements

Looking to dynamically change the value in the button OnClick and slider On Value Changed . If I had to guess on how this was done, get a reference to the button/gui element. Next get the Button ...
1
vote
0answers
37 views

Minecraft Crafting GUI weird bugs

I'm writing a Forge mod for Minecraft 1.8. When I'm pressing the 'z' key a 3x3 Crafting grid should open. In the KeyInputHandler I call @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent ...
0
votes
0answers
19 views

Rotating a button in Unity UI by -180 on the Y and it stops working

The title says it all. if I rotate my button by -180 on the Y axis i cant even click on it. If for example I rotate it 180 on the Z axis everything is fine. Why does this happen and how can I fix it ?
0
votes
3answers
4k views

What are the steps to instantiate a button in Unity?

Given a Canvas test_canvas containing a Button test_button and an empty GameObject that manages instantiation and scripts and the like called test_manager, what are the steps to instantiate this ...
0
votes
0answers
102 views

Unity UI Drag and Drop with conditionals

I have a nice UI drag and drop system (big thanks to quill18 and BoredMormon for their tutorials) and want to get some conditionals in it. I have 4 numbers (that are instantiated on the canvas) that I ...
0
votes
2answers
45 views

Why is my canvas being rendered underneath everything?

I'm currently trying to implement a UI that will overlay a scene and follow a scene's main camera, but I'm running into some issues. When I set canvas's mode to Screen Space - Camera, the Z position ...