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)

2
votes
1answer
217 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
330 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
19 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
34 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
40 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 ...
0
votes
1answer
32 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 ...
1
vote
3answers
298 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
64 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
2answers
187 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 ...
1
vote
1answer
28 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 ...
2
votes
1answer
593 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 ...
1
vote
1answer
474 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 ...
2
votes
1answer
121 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 ...
0
votes
1answer
189 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 ...
1
vote
1answer
180 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 ...
0
votes
0answers
7 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 ...
1
vote
1answer
139 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 ...
0
votes
1answer
68 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 ...
2
votes
1answer
125 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
37 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
59 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 ...
1
vote
1answer
281 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 ...
0
votes
1answer
240 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
80 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 ...
0
votes
0answers
37 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: ...
16
votes
4answers
52k 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
36 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
18 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
3k 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
78 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
43 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 ...
1
vote
2answers
22 views

How to create guides to off-screen objects?

I've played Metroid Blast on Wii U, and would like to build one of its features in a three.js game. The feature is: if an opponent is out of view, a guide is displayed showing the direction of the ...
4
votes
1answer
149 views

Need help with making a journal system

My game uses a system similar to Metroid Prime's logbook, in that it logs things the player encounters and discovers on their journey, categorizing it, etc. I want to write out all of the possible ...
1
vote
1answer
64 views

Creating a DPI and Resolution Independant GUI

How would one best go about it? Assuming I'm using OpenGL to do all the drawing. It seems like the best approach is to have the GUI elements maintain the same physical size regardless of the screen ...
0
votes
1answer
55 views

Unity - Hide GameObject that is behind UI

I have the following example: How can I prevent the part of the sprite that is highlighted in red and is behind the UI from being displayed on the camera, but having the background image still ...
0
votes
1answer
965 views

Unity 5 C# - onClick.AddListener in a foreach loop using lambda expressions

I'm trying to dynamically create Unity 5 UI buttons that each set a global variable decision_id to a different value when clicked. The problem I'm having with this implementation is that they all ...
0
votes
0answers
70 views

Unity onValueChanged Dropdown in loop

I am having a problem with dropdowns which I add them programatically, more precise with the onValueChanged event. No matter which dropdown value I change in game the parameter used by onValueChanged ...
0
votes
0answers
20 views

Perfectly overlap GUI bounds to tiles room

I have a scene built with several rooms procedurally generated. Then I have a GUI which should cover everything which is outside room walls. What I cannot sort out is how to have the GUI to ...
1
vote
2answers
10k views

Changing color of UI Text in Unity into custom values

There are a few objects in the scene as well as a title. I want the title to change its text and color based on the object that is mouse-overed. The script below is added to each object that is ...
0
votes
0answers
68 views

How to make a PROPER main menu (or any other UI windows/modals) in Unity?

So, I'm currently learning both about Unity for the first time as well as the 'new' 2D UI system, but I'm having a hard time figuring out how to make windows, modals/dialogs, main menus etc. which are ...
0
votes
1answer
17 views

How to refresh Unreal Editor Viewport when dragging a spinbox (FModeToolkit)?

The viewport of my custom EdMode does not update while I drag a spinbox (which is in a custom FModeToolkit). In fact, MyCustomEdMode::Render() is not even called (while the spinbox). How can I ...
0
votes
1answer
42 views

How do I lerp text color over time?

On my quest to understand Unity in a zero to hero sort of manner, I've run into a new problem I can't seem to really solve. From computer science I know that updating GUI on the same thread as ...
1
vote
0answers
66 views

game crash on android phone while using unity UI

I am trying to use an unity UI in my game. Initially I Created Canvas with all settings what I need then I compiled it on my phone its working perfectly. Inside the Canvas if I created any button or ...
1
vote
1answer
36 views

Help with open and close UI Menu on background mouse click

I am trying to make a point and click game in unity 5.2.2. My problem is that I need to have a UI menu to open, when the player clicks with the left mouse button on the background sprite, and it ...
0
votes
1answer
53 views

Access buttons individually made by a for loop (old Unity GUI, Unity Editor script)

I've got a problem and I am struggling with this for a couple of days now. I am making an Editor script and I want to access buttons individually when created by a for loop. There is a public class ...
0
votes
1answer
53 views

Ball can double jump in Jumper Game

I wrote a game that has a ball which can only jump (like in most jumper games) to avoid incoming obstacles (only, I haven't integrated the obstacles part yet). Right now, it's just a ball that can ...