x


see vars in gui

I want to see which vars are true or false in a gui. Is that possible??

more ▼

asked Jun 26 '10 at 08:04 AM

crasyboy42 2 gravatar image

crasyboy42 2
34 1 4

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

Yes, showing a GUI is done via UnityGUI - if you had looked in the manual, you would have found it.

Have a look at the GUI basics: http://unity3d.com/support/documentation/Components/gui-Basics.html. What you probably look for is

GUI.Label(Rect(10,10,200,20), myvar);
more ▼

answered Jun 26 '10 at 09:28 AM

felix. gravatar image

felix.
1.9k 18 23 47

(comments are locked)
10|3000 characters needed characters left

.ToString() is also available in JavaScript. That will convert your boolean to a string saying either "true" or "false".

more ▼

answered Sep 01 '12 at 06:21 PM

GradyLorenzo gravatar image

GradyLorenzo
16 1

(comments are locked)
10|3000 characters needed characters left

you can show the content of a variable in GUI using a Label. you should use the ToString method in C# to get the representing string of your variable. if you want to show te value of some properties of your own component just override the ToString method and return the string that you want.

more ▼

answered Jun 26 '10 at 04:24 PM

Ashkan_gc gravatar image

Ashkan_gc
9.1k 33 56 117

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3694
x3464
x109

asked: Jun 26 '10 at 08:04 AM

Seen: 474 times

Last Updated: Sep 01 '12 at 06:21 PM