This HAS to have a simple answer, yet I cannot find any info on this. All I want to do is draw bare text on to the GUI so I can do some debugging. I just want simple, like they used to do it in BASIC:
Print bulletSpeed, 10, 20
All I can find are things like GUI.label and GUI.box, which don’t work for two reasons:
- They insist on having a box drawn around my text. I don’t want that.
- I can’t seem to get them to print a variable value, rather than a static string
Any help?
Consider finding a GUI tutorial, or read all the available options from the API (Unity Scripting Reference) : Unity - Scripting API: GUI
GUI Basics (follow this!) : Unity - Manual: IMGUI Basics
GUI scripting guide (follow this!) : Unity - Manual: Immediate Mode GUI (IMGUI)
Display text : Unity - Scripting API: GUI.Label
Input field : Unity - Scripting API: GUI.TextField
This actually answers the question:
Text = GUI.TextField (Rect(200,200,200,200),Text, 1024,“Label”);
The last argument is the style which can be specified by name.