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)

0
votes
0answers
14 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
1answer
30 views

How to implement a GUI in a JPanel

I have a game that I am programming in Java from scratch for fun. And I have run into the problem where I want an Inventory system to pop up when you press the 'I' button or something (i know how to ...
1
vote
1answer
104 views

What would cause my script generated buttons and text to show in Unity and not on my phone?

I am using Unity 5 and the built in GUI tools. My static GUI shows up just fine which makes me think it's not a text/font issue or some such. Again, it all looks good in the Unity editor when I hit ...
0
votes
0answers
23 views

Unity - UI Mobile - Script Generated buttons/text not seen?

I'm trying to generate some buttons and text dynamically with Unity 5.0 All of my code seems proper. It looks great when I play it in the editor. Everything is generated and placed and sized as I want ...
0
votes
0answers
22 views

Rich Text on InputField breaks Content Size Fitter functionality. Need some help

I'm currently using the input field as a way to make normal(ish) text in Unity. Refer to this question for more detail: How do I go about making a text box that allows for highlight-able and copyable ...
1
vote
1answer
34 views

How do I go about making a text box that allows for highlight-able and copyable text in the new UI?

I'm trying to make a simple chat system for our games lobby, however I am having issues making a text box that allows for text-highlighting. The Text component does not have interactible text, and the ...
6
votes
1answer
69 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 ...
0
votes
1answer
28 views

Legacy GUI - run OnGUI only once

I remember something about onGui being able to be run multiple times per frame, and I also seem to recall that you can check 'which state' the onGUI is being run in, so that you can do all of the ...
1
vote
1answer
133 views

Communication in a simple GUI (C++ / SDL2)

I've spent a few months now working on a fairly simply 2D game engine with SDL and C++. I'm now trying to develop a simple but well-featured GUI suitable for most games. Right now I'm really ...
0
votes
1answer
25 views

Unity Make sprite visible only to shaders

I have made a shader for my UI buttons, the sprites should be black and white, so they can be used as a mask when blending. They should allow for the image behind them to pass through the whiter ...
0
votes
1answer
128 views

Unity5 UI - How to trigger button click event while preventing menu item deselect event?

So I've got a load menu using Unity's new UI system, basically just a list of save games you can select with a mouse click along with a couple of buttons at the bottom to delete or load the selected ...
1
vote
2answers
111 views

Unity: Can't press space to unpause. Is this a Unity UI bug? Or maybe poorly written code?

So I think I have a bug with my pause menu. For the sake of simplicity I've boiled down what I'm trying to acheive: When the player first starts up the game there's a UI menu with one button: 'Start ...
0
votes
0answers
35 views

Unity Buttons and selecting Objects

I'm making a tower Defence Game. and my buttons are working fine... Until i select and unselect a tower. what I've worked out, is that after I've selected a tower the follow section of code sets my ...
0
votes
2answers
78 views

Efficient UI for RTS units

I was wondering how I should approach the runtime changes on the game UI when selecting different types of units in a RTS. For example, in Starcraft, each unit type has its own portrait, attributes, ...
1
vote
0answers
60 views

Recreating iPhone Home Screen in Unity

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
1answer
113 views

I can't drag'n'drop UI-Elements from the Scene-hierarchy into a public field (Unity 5)

I just watched this Video https://unity3d.com/learn/tutorials/projects/survival-shooter/player-health and tried to drag'n'drop the UI-Elements on the matching script, just like they did. But this is ...
0
votes
0answers
37 views

Particle system ONGui()

I have some scripts which uses OnGUI() method and they are attached to my GameMenu object. I need to play a particle system on the scene while the GUI scripts are active. When I do that I cant see the ...
4
votes
2answers
160 views

Unity UI square that fills width OR height

I'm trying to create a board with this requirements: It SHALL be square. It SHALL fit available width OR height. It SHALL be centered in the canvas. It MAY be wrapped into as many additional ...
1
vote
2answers
1k 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: ...
0
votes
0answers
62 views

player sprite hidden after using a stage (scene2d library)

What i'am doing is showing a tiledmap on the full screen , and it works fine. The character moves perfectly and the camera too. What i want is : Showing some text or imageButton over the map like ...
0
votes
0answers
36 views

Scaling buttons in LibGDX

I'm trying to make a usable GUI for a Android game using LibGDX. But I'm having big trouble getting the fonts and buttons to a usable size. Scaling fonts work, but the results are not very pretty. ...
1
vote
1answer
152 views

LibGDX problems when switching screens and disposing: AL lib: (EE) alc_cleanup: 1 device not closed [closed]

I have to classes which implements the Screen interface. I'm trying to switch between these screens. I'm able to switch one time, but when trying to switch back, I receive the error: AL lib: (EE) ...
0
votes
1answer
97 views

Spawning moving text make it disappear overtime

I am trying to display a text when I click the letter 'R'. When the text appears, it should slowly slide down on the y axis only, slowly disappear over 4 seconds and get disabled. I am not able to ...
0
votes
0answers
9 views

How to handle game widget destruction as a result of an event?

I have a simple hierarchy of containers and widgets like buttons, line edits and labels. Every node in this hierarchy is a Widget, specialized with a subclass to make custom behaviors for each type of ...
0
votes
1answer
214 views

How to show a popup with text when a game object is selected?

We're building an FPS game where you walk around a 3D environment and walk up to objects, click, and then a GUI message pops up. Basically, I've got a character, walking around in 3D space, and is ...
0
votes
1answer
187 views

LibGDX: Scrollpane won't scroll to bottom after adding children to contained table

To my game I want to add a gui element that displays text and textButtons whenever something is happening or it wants you to make a decission (an answer while talking to a person for example). To keep ...
0
votes
1answer
86 views

How to get Unity's 4.6 UI images to layer over each other perfectly?

I've been noticing that if I have two images, lets say squares. I have A as the parent of triangle B. Triangle A and B both have their offsets at their anchors, which are on the 4 corners of it's ...
4
votes
1answer
651 views

Blocking Physics Raycasts with Unity's 4.6 UI?

I use raycasts to determine hit objects and object selection in our game. I want these to be blocked by UI elements. Before I had a crude form of that where I just excluded rects of the screen, though ...
1
vote
1answer
131 views

LibGDX scene2d good practices

I'm developing a game using LibGDX and in a part it has a pretty complex UI for profile selection and stuff. I have some general problems. I'd like to know good practices when generate good looking ...
1
vote
0answers
37 views

Unity Javascript GUI.Button shows up twice

Hi I have created a simple menu in Unity but I wanted to create my own style for colour/fonts. However for some reason it prints each button twice to the screen, once with my custom style, and once ...
1
vote
1answer
592 views

Unity 4.6 UI button AddListener sets the same callback to all items in List

I have this method that is looping through a list and sets values on the current item in the list. Everything works fine the lists values are correct exept the AddListener. All listeners on the ...
1
vote
2answers
86 views

Curved Meters and Gauges

I'm wondering how people here on GameDev stack exchange would handle curved meter GUI elements for things such as life bars or energy bars. My thought on the matter was that you could use a shader ...
1
vote
2answers
295 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 ...
0
votes
1answer
92 views

Migrate from NGUI to Unity UI

I used NGUI 2 and NGUI 3 for our UI. Now want to upgrade to Unity 4.6 and migrate all NGUI to Unity UI. Is there any tools? What's the best practice?
0
votes
0answers
42 views

How to setup States in NIftyGUI and LWJGL

I think this is a simple question but I just cannot figure it out. I have a main menu that is using nifty gui and then my game which is rendered using OpenGL Code (LWJGL) I cannot figure out how to ...
0
votes
2answers
123 views

How do I access my existing script from a different script attached to a different gameobject?

I have my health(script) component on my player gameobject that gets boosted whenever we tap on that gameobject. However, I want to add a separate Gui texture button gameobject and tap on that to ...
3
votes
1answer
137 views

Unity Canvas blocking objects in Editor

I think I am missing something really basic here..., I'm creating a 2D game in unity, and the UI Canvas (with the setting "Screen Space - Overlay") is blocking exactly a quarter of my workspace. I can ...
1
vote
2answers
203 views

Displaying scores in tutorial projects - GUI and UI

I've just started learning to use unity by working through the tutorial projects but in both roll-a-ball and space shooter I've hit dead ends in the text lessons. The lessons tell you to simply add a ...
0
votes
1answer
73 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
34 views

why the camera didn't capture gui position properly?

I make an GUI.DrawTexture and it's draggable, i want to make my GUI detect 3d object when i drag it to its position. The method works properly with guiTexture, but when i used it for GUI.drawable the ...
1
vote
1answer
1k 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 ...
1
vote
1answer
1k views

Button stays highlighted after being clicked - Unity3D 4.6 GUI

Sometimes, after clicking a button created by unity's new UI Button, the button stays in its highlight state. Note that Button script has Color Tint set as it's Transition property and the ...
0
votes
2answers
858 views

How do I create a simple clickable button?

I've tried to attach this function to the play button. public void Play () { Application.LoadLevel("Scene1"); } I've created an empty Game Object and attached my script to it. But when I go to ...
0
votes
2answers
93 views

Stop Unity UI Buttons from being clicked when a Facebook Window is overlayed

Having an odd issue. When I play with the Facebook SDK for Unity, and the Windows popup like the login window or the Friend Selector window, if I use the mouse to click in the window I end up clicking ...
0
votes
1answer
233 views

Libgdx drawing semi-transparent circle on pixmap

I am currently working on an android game using libgdx and would like to add a joystick to its interface. For this I use the built-in touchpad class. Untill now I have used external images for ...
0
votes
1answer
112 views

Animated Energy/Combo Bar (Unity 4.6) [duplicate]

How could I achieve the animated Combo bar effect used in Ski Safari / Ski Safari: Adventure time? Preferably with Unity 4.6 UI. General explanations also welcome! Links to videos showing the wanted ...
1
vote
1answer
5k views

How to detect that user has touched UI canvas in Unity 4.6?

In my 2d game I have a HUD with some buttons on it. To make it I am using new UI system, which was presented in Unity 4.6. When user is touching button, I am running method, which was declared in ...
1
vote
1answer
220 views

How to make sure that all the UI elements were the same size on all screens in new Unity 4.6 UI system

I have made a HUD for my 2d mobile game with the help of the new UI system, that was introduced in Unity 4.6. But when I am trying to play game in Unity editor, the UI elements have normal size, but ...
1
vote
1answer
133 views

Drawing shapes and images in libgdx dialog

I am currently working on a dialog window for my android game using libgdx. This dialog window contains a collection of labels and buttons, but should also contain an image. The image represents the ...
4
votes
2answers
428 views

Is there an alternative to VBOs or deprecated functions to draw many small quads?

I was thinking about how to program a user interface in a 3D game. The problem is, immediate mode (glBegin and glEnd) is deprecated for a long time but I don't think vertex buffer objects (or arrays) ...