Hi, i have some problems with my GUI textfield. I have 6 textfields in different 6 scenes. When I fill one of them and it saves, in all others automaticly adds same text. And i cant edit it.
Note - this is on android phone, in unity there is no problem with this. Here is the script of one of those textfields if this helps:
static var stringToEdit : String = "Logo name is...";
function OnGUI () {
stringToEdit = GUI.TextField (Rect ((Screen.width / 2) - 85, (Screen.height / 2) + 180, 200, 40), stringToEdit, 25);
}
function Update () {
if(stringToEdit == "Adidas") {
Application.LoadLevel ("GoodChoise");
}
if(stringToEdit == "adidas") {
Application.LoadLevel ("GoodChoise");
}
if(GUITextField1.stringToEdit == "Adidas") {
ScoreSystem.myScore += 1;
}
if(GUITextField1.stringToEdit == "adidas") {
ScoreSystem.myScore += 1;
}
}
↧