- Home /
Solved problem
Saving data through FileStream DataInfo? Think i'm misunderstanding something.
Alright, well i'm having this issue when I save data for each individual object, it loads the data as if it only saved one object's data.
Well here's what I mean.. In my script, when ever I press save data, the names of my object will be saved within the script.
But. When ever I load all of the names within the individual object's scripts. It's like they all become the name of the last saved object's name.
![alt text][2]
It's as if each individual save data is being saved over.
I notice I gave each individual object the same saved data path. Each script has the same savedata file path.
Which is named "/SaveData.Banana" Is that the issue? Am I over writing the save file? [2]: /storage/temp/84468-example.png
Answer by Xeong-Hu · Dec 21, 2016 at 10:26 AM
Yep. Nvm I totally understand it now.
But I can't describe it.
Ok, so I have this string called Name. I store Name into a data file, which when I execute the save button, it saves a file which is named SaveData.Banana.
This save function is in each GameObject because each Gameobject has the same script. Therefore, if I save the Name of one string name, it becomes stored into a Data called SavedData.Banana. Then I load SaveData.Banana into each GameObject giving them the same name.
So instead I just did sumthing like SavedData.Banana + IndexOf(gameObject) So it'll have a distinct and original save file and then ofcourse have an original load file.
IT'S GOOD!
Follow this Question
Related Questions
Saving system tutorial / Load through main menu 1 Answer
Proper way to save Terrain for save game feature? 1 Answer
Save and load serialization problem 0 Answers
Using save options to create saves for toggle buttons, but won't compile! 1 Answer
Add an array to a class that has been Serialized with BinaryFormatter 1 Answer