This question was
closed Oct 07, 2016 at 11:05 PM by
VictorSIlvaK for the following reason:
The question is answered, right answer was accepted
Question by
VictorSIlvaK · Oct 07, 2016 at 07:34 PM ·
datascenesdata storage
Keep data between scenes
Hey everyone.
How can I keep a Input Field typed text between two scenes and yet load it into a Text at the other scene?
Comment
Answer by CupOfMayo · Oct 07, 2016 at 08:45 PM
Just use static variables :). For example a script in scene 1, let's call it newScript.
static string stringBetweenScenes;
void Update()
{
//Do stuff to set your stringBetweenScenes
}
Then to load it in another scene:
public string yourNewString;
void loadStaticString()
{
yourNewString = newScript.stringBetweenScenes;
}
Follow this Question
Related Questions
What is the best way to achieve local database for mobile? 0 Answers
Some help with Data Save/Load would be most appreciated 3 Answers
Save multiple inputs for one item and print out all items 0 Answers
Saved data to .txt file is returning null 1 Answer
Looking for the best datatype for a data storing problem 0 Answers