- Home /
Can you save more than 1 array into a file?
Is there?
BinaryFormatter bf = new BinaryFormatter();
FileStream fs = new FileStream(Application.dataPath+"/Saves/arrays.dat", FileMode.Open);
array = (int[])bf.Deserialize(fs);
Thats for the loading, and saving :
BinaryFormatter bf = new BinaryFormatter();
FileStream fs = new FileStream(Application.dataPath+"/Saves/arrays.dat", FileMode.Create, FileAccess.ReadWrite);
bf.Serialize(fs, array);
Any help is awesome!
Comment
Your answer
Follow this Question
Related Questions
.txt file to string[] brakes by line 1 0 Answers
Possible MultiChannel Audio composer software? 2 Answers
Best method to save a multi-dimensional array as a file? 1 Answer
Spawn Multiple Monsters 1 Answer
multiple classes? 1 Answer