- Home /
see vars in gui
I want to see which vars are true or false in a gui. Is that possible??
Answer by fherbst · Jun 26, 2010 at 09:28 AM
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);
Answer by Ashkan_gc · Jun 26, 2010 at 04:24 PM
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.
Answer by GradyLorenzo · Sep 01, 2012 at 06:21 PM
.ToString() is also available in JavaScript. That will convert your boolean to a string saying either "true" or "false".