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
1answer
25 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
2answers
33 views

Detecting Left and Right Mouse clicks on UI Text objects that are dynamically created

So, in my game I create a bunch of UI Text game objects dynamically (in the C# script), but I just can not find out how to properly detect Left and Right mouse clicks on these UI Text that were ...
2
votes
3answers
69 views

How to dynamically create an UI text Object in Unity 5?

I have been searching for something that should be simple, but Unity 5's documentation on that is fairly outdated. What I want to achieve is to be able to create UI Text totally from script, i.e. ...
-1
votes
0answers
66 views

How to implement good GUI design in Unity? [closed]

I am new to game development in Unity. I would like to know how we can create an animated GUI similar or exactly like the one below?
1
vote
0answers
13 views

Unity: onEditEnd and onSubmit only firing from Return key

I have an InputField in my UI, but currently I can only submit its contents via the Return key. I tried mapping other buttons to the Submit action (e.g. the tab key on keyboard and the X button on my ...
1
vote
2answers
49 views

Continous repeatable object/image moving horizontally unity3d

I want to move objects on the screen horizontally. And the user has to pop the object by touching it. When user touch it, it gets destroyed and new object comes randomly. For experimenting, I used ...
1
vote
1answer
37 views

Rendering a dynamically sized box

So in games where there are textboxes with different sizes appearing, how does one actually render them efficiently? Games like Final Fantasy IX have dynamically sized speechbubbles for example, each ...
1
vote
1answer
40 views

Send Messages in Update Function Button UI Unity 5

I've been working on a project where i need to fulfill the following behaviors: 1) when clicking anywhere in the screen the character should do something 2) there are some buttons so except when you ...
1
vote
0answers
19 views

Unity keyboard GUI navigation priority

I noticed something strange while playing with my menu on keyboard. I have four items arranged in a square (i.e. the top-left item should be able to navigate to the top-right and the bottom-left). If ...
1
vote
0answers
19 views

Easiest method to setup a UI for an app, and use .cpp for the logic of the touch handling? [closed]

This is specifically for iPhone development, can I use Xcode for this? Is there more to it than just dropping in my cpp files? Are there simple alternatives to Xcode?
1
vote
1answer
128 views

Unity UI Text Font Size changes with the screen resolution Problem

I am working on a project and now I have a problem . The problem is the font size. The font size is OK inside the Unity but it is really small when I play the game on a real Android device . My ...
1
vote
1answer
51 views

Making a Fall Trigger Game Over

I have been struggling with this fairly basic issue: To make a game over menu appear upon death. I am making a 3D game in Unity, where you, the player, must control a sphere with the basic controls: ...
0
votes
2answers
34 views

How to implement own UI widget in libGDX?

I want to implement my own widget, here is an image: what I want to get. Instead of numbers there will be some names, but I think it doesn't matter. I'm pretty new in libGDX, so could you please ...
0
votes
0answers
41 views

Apply Pixel Perfect by script in Unity?

How can I apply Pixel Perfect by script in Unity? All I could find on the web is this which does help at all..
1
vote
1answer
58 views

Creating a Slide-Up Menu

How can I create a menu that slides up while "un-fading" as illustrated in this video? As you can see in the video, the menu also falls down a bit in the end which gives it a realistic feel. I ...
3
votes
1answer
77 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
2answers
49 views

How to make nifty gui textfield to use a larger font

Hi I have a text field on my screen but its tiny: <panel height="13%" width="100%" childLayout="vertical"> <text id="label1" height="50%" font="Interface/Fonts/MinionPro.fnt" ...
2
votes
1answer
56 views

How to make the inside of a cube accessible

I have a cube, it is made up of smaller cubes each making the big cube 8x8x8. The cube is the map. The player of the game needs to be able to appraise the entire map and understand it without having ...
1
vote
0answers
55 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 ...
2
votes
0answers
45 views

Why are parts of this Unity scrollrect not being bound to the mask?

I'm setting up a system for people to load up extra levels. Since I don't know how many levels are going to be loaded I have a UI prefab that gets added to the main Level Load UI. However, the Text ...
0
votes
1answer
40 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 ...
1
vote
2answers
156 views

Chromium Embedded Framework and Unity3D?

I have recently heard about the Chromium Embedded Framework and was over-joyed as I want to use html as my GUI source. I did find a C# version but it seems to be for Windows Forms. I'm not too ...
1
vote
1answer
48 views

How would I load a new scene when a score that is stored in a string is reached?

This is a code that I am working on for a space shooter. Part of it works and my score does increase by 7 every second while being loaded into a GUI box, but my script does not load my scene when the ...
1
vote
0answers
26 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 ...
1
vote
2answers
59 views

Limit buttontext to one line in Unity?

I have many buttons in my game. There are different texts on them every time. But some texts are too long and get split up into two different lines. Is there any way I can fix this without resizing ...
2
votes
1answer
97 views

In My Direct2D Gui System, Is It Safe To Use A Bitmap Render Target Per Gui Element?

I am trying to implement a relatively simple GUI system for use in a few simple games. In this system, all Gui elements extend BaseControl. BaseControl has an update and draw method, as well as ...
0
votes
0answers
32 views

How to create a toggle button with slate in unreal engine?

How can I create a toggle button with slate? By toggle button I mean a normal button which remains pressed after one click and returns normal after a second click (the style is toggled). It seems ...
1
vote
0answers
29 views

Change gui in java game

im making a 2D Server/Client game, i have very little to no problems with the server but now i wanna work at the client. I think about using a JFrame and all the other gui classes/methods. My question ...
1
vote
1answer
108 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
1answer
306 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
1answer
39 views

What determines the hit detection ordering for graphic elements in Unity (2d game)?

I have a bunch of overlapping buttons spread across several UI Canvases. The default mouse behaviour only registers hover/click events with one of the overlapping buttons, which is ideal for my ...
0
votes
2answers
120 views

How to resize a button without resizing its text

I think it is done with the Anchors of the Rect Transform. I have tried all the possible combinations of the following default anchors: Unfortunately, when I resize the button in the Scene, the ...
1
vote
1answer
179 views

Creating a GUI Countdown Timer Unity5

This was originally posted as a follow-up comment to http://stackoverflow.com/questions/30714357/guitext-in-unity-5-need-an-alternative , but I'm asking it here as a dedicated question as per the ...
0
votes
2answers
150 views

Unity 5 Dynamic Button Creation with Event Parameters

According to the documentation, you cannot instantiate buttons except via prefab instantiate. http://docs.unity3d.com/Manual/HOWTO-UICreateFromScripting.html You might wonder why we don’t have a ...
0
votes
2answers
629 views

How to detect mouse over for UI image in Unity 5?

I have an image that I have setup to move around and zoom in and out from. The trouble is the zoom can be done from anywhere in the scene, but I only want it to zoom when the mouse is hovering over ...
0
votes
0answers
48 views

Unity 2D - GUI box not moving with game object on X axis

I am trying to create a health bar above a spaceship in a 2d spaceshooter. Right now I just need to create a box and move it with the player. I found WorldToScreenPoint() which should work althought ...
2
votes
3answers
171 views

How to create in game menu attached to unit

I'm creating a game similar to Banner Saga, except my game will be in 3D, with a camera that can move around and zoom in and out. What I want is for a menu to appear after the user clicks on a unit. ...
1
vote
1answer
67 views

How do I know what button was clicked? (Unity)

I have a prefabbed button (UI.Button) which I'm instantiating ten times: public void LayoutButtons() { GameObject newCanvas = Instantiate (canvas) as GameObject; for (int i = 0; i < 10; ...
1
vote
1answer
53 views

Why does Forge not find my texture for my custom background?

I am creating a minecraft mod that improves the main menu for my minecraft server. At first I wanted to create the background, but somehow when I try to start minecraft it closes and I get a ...
1
vote
3answers
543 views

Why does a UI button that is child to a canvas not appear in game view?

I am trying to place a button onto a canvas background using C# script. I want the button specific to the canvas (i.e., if I move the camera to look at another canvas, I do not want the button ...
2
votes
2answers
78 views

WorldToGUIPoint seems always off by about 2 pixels

I'm trying to draw small boxes at each vertex of a mesh, in the editor. My OnSceneGUI code looks like this: foreach (Vector3 vertex in _mesh.vertices) { Vector3 worldVertex = ...
0
votes
1answer
134 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
0answers
108 views

UI Element in World Space OverrideSorting

Let me explain my problem. From a database I create buttons (around 40) in a World Space. The problem is that some buttons are displayed in front of other. (screenshot) Personally I would like the ...
2
votes
1answer
92 views

Keeping Android device awake [closed]

I currently program a game in which the user don't need to interact with the screen. Is there any way to keep the screen awake?
0
votes
1answer
57 views

My GUI stopped working?

Okay I bought this asset online so I would like not to show the whole script. The problem is this asset stopped working when I updated from unity 5.0 to 5.1.2. The script is for a controller GUI ...
1
vote
2answers
99 views

How do I refer to the object that called a function?

I have a large number of buttons instantiated from a prefab using a loop, as follows: public void LayoutButtons() { GameObject newCanvas = Instantiate (canvas) as GameObject; for ...
0
votes
2answers
60 views

LibGdx TextButtonStyle Offset not working correctly

I'm intending to give an animation to the TextButton by giving the pressedOffsetX and pressedOffsetY values: TextButtonStyle buttonStyle = new TextButtonStyle(); buttonStyle.font = font25; ...
1
vote
2answers
87 views

Should input be per-frame or per-update?

I'm implementing a GUI system to look around a 2D tile-based world. At the moment, I'm updating it every time the mouse moves (which happens to be per frame, since that's when it polls for events). ...
4
votes
1answer
108 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
91 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. ...