Hi
A quick question-how to display easiest some message when testing a game in build&run mode?To use GUIText,or there is some other way?
Hi
A quick question-how to display easiest some message when testing a game in build&run mode?To use GUIText,or there is some other way?
GUIText is fine. Can’t add anything to that. Want did you have in mind? GUIText is to display text on the screen as a top layer.
Do you miss something in functionality that makes you think that you need another component?
I use Debug.Log
for printing values: http://unity3d.com/support/documentation/ScriptReference/Debug.html but that doesn’t help in build&run of course.
Update on you nullpointerexception
Try to use the following code, because Components don’t have a constructor.
// C#
public void Awake()
{
GUIText text = this.gameObject.AddComponent<GUIText>();
// more options here
}
Yeah, GUI text is fine, but I you just want it for editing purposes, I think you can use the print method, which I think prints to the console, so then you can just check there, and see whether what you were testing has worked…
Hope this helped!!!
-Grady