1
vote
1answer
352 views

Unity 4.6 GUI - 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 ...
0
votes
1answer
142 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 ...
0
votes
2answers
105 views

How to show a float with no decimals [closed]

I want to show the current health and stamina of the player using GUI.Label. All is working fine however it shows the values with decimals to the millionth (example: ...
2
votes
3answers
136 views

How to display a GUI Texture for a certain amount of time

Is it possible to make a gui Texture display for a certain amount of Time.
0
votes
1answer
92 views

Generating a particle effect on top of a GUIElement (Unity)

I am working in Unity on a 2D project which is using C#. I have a number of guitextures which are hearts in order to create a sort of life meter. I would like when the player loses a heart for the ...
0
votes
1answer
63 views

touch in guiTexture

Before time in my game start. i want there will show a guiTexture.. if i touch this guiTexture, that will hidden and the time game will start. I try to make a script but it doesn't work. I'm a bit ...
0
votes
0answers
61 views

hide and show many guiTexture

in the 1 scene there are many guiTexture. So how to write this code ? public class guiTanya : MonoBehaviour { public GUITexture guiA, guiB, guiC, guiD, guiE, guiF; void onMouseDown() { //if i press ...
0
votes
1answer
185 views

Unity Gui from text file templates

I've been banging my head against a wall this past while over how I might create menu's and menu components in unity from text file. I would normally just build my own extended panel/label classes etc ...
0
votes
1answer
150 views

Make GuiText responsive

I'm using C# code to make a responsive GuiText. I was abel to make a responsive GuiTexture, but I'm struggling with doing the same for a GuiText. Code for the responsive GuiTexture using ...
0
votes
1answer
415 views

Going from WPF to Unity3D, how to implement the MVVM-pattern?

I've been working with MVVM in WPF for a long time and I'm now trying out Unity3D for a GUI-driven application. Can I work with view models and bind them to properties in GUI-components? I guess the ...
1
vote
2answers
161 views

Hide part of the GUITexture in Unity

I have a Health Bar in my Unity game and it's implemented as a GUITexture with gradient image from red to green. Now I can reduce it's width from max width to 0, but is still scaled gradient. ...
0
votes
1answer
167 views

How do I animate Unity GUIComponents?

I want to transform my GUIWindow from the bottom of the screen to the middle whenever the user presses a button. How can I do this?
0
votes
1answer
815 views

Prevent GUI Clickthrough

I'm using NGUI to setup my UI in Unity. Attached to the MainCamera I do have a script to rotate the camera view by clicking and dragging. It does handle mouse events using Input.GetMouseButton(). ...
-2
votes
1answer
130 views

Why is my Snake' tail rendering the wrong sprite? [closed]

I am making a snake game in Unity. The game is simple, using Texture2D to display the head, tail and body parts. I am stuck with this problem: I stored 4 textures (each one for one of the four ...
2
votes
2answers
140 views

Print on the GUI in Unity

I'm trying to show the players name on the GUI with a label. GUI.Label(new Rect(10,10, 100, 30), playerName); Instead of use the default style I want to use a different font with larger character. ...
1
vote
1answer
2k views

GUIText size on 4:3 and 16:9 is different

I have a text (guiText) on the screen. It shows correctly when viewed on 16:9 resolution. But it scales up when viewed on 4:3 (e.g iPhone4). I am using following ObjectLabel script to place it on ...
0
votes
2answers
85 views

string on GUI.Button not showned

I am sure that inventoryItem.Name contains "Wood" cause i see it when i add a breakpoint. Still i get nothing in the game. Just empty buttons. void DrawInventoryContent (int id) { ...
0
votes
1answer
514 views

Unity GUI not in build, but works fine in editor

I have: GUITexture attached to an object A script that has GUIStyles created for the Textfield and Buttons that are created in OnGUI(). This script is attached to the same object in number 1 3 ...
1
vote
1answer
295 views

Ignore specific key press in textbox

there is a text box on GUI in my application created using Unity3D. in the textbox user can input only the keys of "A-Z", "0-9" , "enter key" , "." and "," other key press should be ignored (not ...
1
vote
1answer
4k views

Enter Key press event detect from textbox - Unity3D - C#

i am doing a project with Unity3D . in the interface there is a textbox. once user input some text and and press enter key then i want to read the text in text box. so please tell me how to ...
1
vote
1answer
892 views

Flickering GUI on Android

New version of Unity is causing rather weird problems on Galaxy S device. The GUI starts to flicker, tear and disappear altogether at random in different screens. But this only happens on the second ...
2
votes
1answer
308 views

Inventory View Screen

Looking to create an inventory screen in Unity, and trying to think of the best way to do it. My current line of thinking is having a few rows of squares for inventory items that are drag and ...
1
vote
0answers
72 views

UIToolkit VerticalScrollable dont hide when is moving [closed]

im experiencing a weird bug with the Vertical Scroller (mainly in iOS, but even in the Editor): when a vertical scroller is still "moving" (so when it'snt totally stop) it's impossible hide this ...
1
vote
2answers
940 views

How to make a gui button follow a path after a touch?

I would like a button in my gui menu to follow a specific path if we selected it, I am wondering how I could do it: if we touch the button, then it can only move on the specific path, it is an arc ...
0
votes
1answer
712 views

Unity3D GUILayout Window Wont Show Components

I am fairly new to Unity, but picking things up quick. This is actually one of the first problems I have come across that has me stumped. I am trying to print a good amount of components onto my GUI ...
2
votes
2answers
665 views

How can I prevent clicks from going through a GUI.Box?

I have a GUI.Box that I slide in from the side of the screen. How can I prevent mouse interaction from going to any objects under it (another GUI.Button for instance, or for that matter an ...
2
votes
1answer
3k views

Should I use XNA or Unity to build a video game? [closed]

My friend and I are planning to make a video game (like Slender) where the character is stuck in a building, when lightning strikes, and the lights go out and your objective is to find the back-up ...
0
votes
1answer
380 views

How do I prevent dynamic GUI elements from overlapping in Unity?

I'm working on a birds-eye-view for our Unity3D game world, where each point of interest has a label hovering above it. The problem is that sometimes they overlap, although there is more than enough ...
4
votes
1answer
2k views

Unity3D GUI - what exactly it does when create controls and check their statuses?

On unity3d website in the manual on this page: http://unity3d.com/support/documentation/Components/gui-Controls.html I found an example of "GUI.changed" function usage(below). And it looks like it ...
0
votes
2answers
2k views

GUI.Button inside GUI.Window not responding

I am trying to do some GUI work with unity but am having some issues. I call a window with this code: fortuneRect = GUI.Window(0, fortuneRect, fortuneWindow, "Your future"); and inside the window ...
0
votes
1answer
6k views

Unity GUITexture or GUIText not showing up

Currently I've got a little 2.5D platformer with the camera tracking the player. Now when I go to insert a GUITexture or GUIText game object into the scene, it comes up absolutely fine in the Editor ...
3
votes
3answers
4k views

Can an iOS application have an explicit quit button?

I've heard a rumor that you cannot have an explicit quit button on your app when it goes to the Apple App Store, can anyone verify this? It seems that most applications do not have one, and there is ...