I want my game to load a config (.cfg) or ini file from outside the game directory, and also have it save to it when you save game settings.
The reason I want to do this is because I want the to give people the option to fine tune the settings, and set it to things not available in the options. Many PC games do this, you can edit the config.cfg/config.ini file to add/remove graphic effects, and change the resolution if the game doesn't support the resolution you use, you can set it in the config file, I want to have a config file for my game to let people to the same thing.
I figured that if I loaded the file from outside the game folder, it will still be accessible to the user after I build the game, I would just have the move the to the build game's directory.
How would I go about doing this? Preferably in C#. I know how to get the game's directory, but I don't know much beyond that, and I never got any answers when I looked it up.
You can store your settings in on a prefab object(via a custom settings script on it) and you can serialize (generate text from it) and deserialize (load from text) the prefab object into/from the config file you created.
NOTICE: This example is using binary serialization. You would want to convert it to text serialization.
To read/write a text file: http://www.csharp-station.com/howto/readwritetextfile.aspx