- Home /
Textboxes and server side storage
I'm working on a unity project where I need to have at least 250 textboxes. I don't however need them to load all at once.
What i'm trying to do, is to with a start row of text boxes, then the user can click a button at the bottom of the program, and it with save the content of all the text boxes to the server and add another row.
I also want to know how to have the unity webplayer read the saved text file and import the data the user saves back into the text boxes.
Thanks in advance!
You know the steps that you have to do, so look them up! Check GUI to see how to create text boxes and store their values in variables, check the www class to see how to connect to a server and finally get the saved values again(also using the www class).. These are all pretty well discussed topics and I'm sure you'll find plenty of discussions and answers on the web. When you get stuck on a specific part, then let us know :)
I need 250 texboxes. You can't just define 250 variables. I'm new to unity. I have no idea where to start.
Answer by -hiTo- · May 09, 2012 at 02:36 AM
Yes, you can absolutely "just define 250 variables". There is actually no other way of doing it.
250 textboxes:
string[] textboxes;
private void Start()
{
textboxes = new string[250];
}
private void OnGUI()
{
GUILayout.BeginVertical();
for (int i = 0; i < textboxes.Length; i++)
{
textbox[i] = GUILayout.TextField(textbox[i]);
}
GUILayout.EndVertical();
}
Your answer
Follow this Question
Related Questions
Unity 4.1.2 Dynamic text disappears 0 Answers
Editing certain words in a single NGUI Text Box 0 Answers
How to dynamically save scenes 1 Answer
My text document is updating twice when its only supposed to once 2 Answers
HUD appearence 2 Answers