- Home /
 
Android textfield problem
Holla, i encounter Textfield Error on Android, the field did not show the text i write on android keyboard, this [problem][1] has been asked but not answered yet.. so if somebody could help.. it will be so much appreciated :)
[1]: http://answers.unity3d.com/questions/222638/android-textfield-problem.html
i try to give my textfield a style so it will looks a different than the original black box from Unity..
 var names : String;
 var school : String;
 var age : String;
 var windowTexture : GUIStyle;
 var labelStyle : GUIStyle;
 var fieldStyle : GUIStyle;
 function OnGUI(){
     GUI.Window(0,new Rect(Screen.width*0.3,Screen.height*0.1,Screen.width*0.65,Screen.height*0.55),Field," ",windowTexture);
 }
 
 function Field(){
     GUI.Label(new Rect(20,20,100,50),"Nama     : ",labelStyle);
     name = GUI.TextField(new Rect(170,20,250,50),names,fieldStyle);
     GUI.Label(new Rect(20,100,100,50),"Sekolah : ",labelStyle);
     school = GUI.TextField(new Rect(170,100,250,50),school,fieldStyle);
     GUI.Label(new Rect(20,180,100,50),"Umur    : ",labelStyle);
     age = GUI.TextField(new Rect(170,180,250,50),age,fieldStyle);
 }
 
               after i click the GUI Textfield, and write it on my android, the letter of text jsut not appearing, anybody maybe could point me to the right way?
EDIT : -still not yet fixed the problem, anybody could help?
Answer by Rgalaxy · Jan 23, 2014 at 05:44 PM
ok, it solved, it seems Unity did not receive "name" as a variable, i couldn't use name, instead if i used names, it can do..
also, at the code above, at line 14, it should be names, rather than name. Sorry for not seeing it :)
Your answer