|
I have a text file which is contain information about game level ; award that you get, already played or not, the level is locked or not? i have format like this.. 1,0,0,0 <<< first digit determine level , second is locked level , third is already played and the last one is award you get when we pass each level , there is a script that modify the text file i know how to read but don't know how to write in the location in the file that i want for example i want to modify text file at level 5 so in text file "5,0,0,1" must be modify as 5,0,1,3 (because you already played), but most tutorial that i found it creates new text file or write new line but do not mofidy existing data. how do i suppose to do?
(comments are locked)
|
|
rather than writing data in text files you can use Player Prefs they are much easy to read and write. Can it work in IPhone and Android?
Sep 06 '11 at 05:15 AM
Dot45
it works on all the available platforms
Sep 07 '11 at 06:09 AM
crazyKnight
(comments are locked)
|
|
Not sure if this will help or not, but I just added saving/loading game from text to my project. Here's some of the lines I use when saving: So each part of the line is a different variable, so I can have that variable change and then save it to only change that part of the line. I hope that helps somehow...
(comments are locked)
|
|
You'll want to use the streamreader and streamwriter classes or alternatively Unity's TextAsset API.
(comments are locked)
|
