I need a simple input TextField in Unity, for example for writing the user's name. Something like the Input Text Fields in Flash would be perfect. When the users clicks on them typing is enabled.
Can you provide example code? GUI.TextField(new Rect(32, 32, 180, 32), "xd"); This gives me an error.
The docs have sample code. You really need to say what the error is; "this give me an error" doesn't help much. --Eric
The exact code I posted gives me the following error: "NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUIUtility.GetControlID (FocusType focus, Rect position) UnityEngine.GUI.TextField (Rect position, System.String text) Main.Start () (at Assets/Main.cs:12) "
http://answers.unity3d.com/questions/18736/restrict-characters-in-guitextfield.html#answer-18747 --Eric