- Home /
Save Game Folder
I want to create a save game folder that will hold terrain data and game settings e.c.t
So, there are two things i need to know
How do i create a folder using unity? And put it on say the desktop for example...
And How do i create a text file and write to it in this folder to save a game?
Answer by kolban · Apr 30, 2012 at 09:37 PM
Your scripts can utilize any of the Mono functions. See for example:
http://docs.mono-android.net/?link=T%3aSystem.IO.Directory
This class controls directories on the file system and includes a method to create a directory which can be used to hold your saved game information.
In addition to this class, there are many others that can be used to perform File I/O to write content into files.
exactly what i was after but... How do i use it? isn't this site android only? Cant find anything in the script reference about it only AssetDatabase.CreateFolder(); which would create a folder in the project
Hi there, the website for $$anonymous$$ono documentation is a bit "iffy" ... but with a bit of practice ...
On the left of the web site there is a "Documentation List" tree view. Go to the top of the window and find "Base Class Library". Next ... go down to "System.IO" within that folder. Next ... expand "System.IO" and pick any of the classes. I have found that clicking on "System.IO" itself takes me somewhere else.
Oh ... and despite the docs saying "Android" ... these (at least to me) are the same $$anonymous$$ono docs cross platform.