I am looking to create a config file (.config extension) so store variable data from scripts, kind of like a way of saving the settings so they can be used on other machines.
This will mostly be used for settings and to check if the game has been run before.
Does anyone know how to generate and save files to a location (Windows Build) and then call them up on open to load the settings again?
Does anyone know how to get the path of the build, so instead of specifying the path manually like:
C:\Games\TheGame\Saves\save.config
have just the:
\saves\save.config
bit so no matter where the game has been installed it will go into that folder.
Hi,
Are you talking about the standard way to write / read files in C# ? If yes, then I would suggest you to do as recommended in the msdn:
https://msdn.microsoft.com/en-us/library/8bh11f1k.aspx
https://msdn.microsoft.com/en-us/library/ezwyzy7b.aspx
The choice of data format is up to you.
I guess you should use the persistent data path:
David
You can use Application.persistentDataPath + “/…/saves/save.config” to go to that folder you say.