Executing code from a text file and writing changes to it

I have a text file that contains some variables in the form of an options.ini file


i have already initialised the variables and i want to make the game execute the text file so var1 and 2 get their values from inside it (i use it for saving options) And also if a variable changes ,how can i store its new value next to its name in the text file

I have a feeling that you should look at playerprefs. See the unity scripting documentation for playerprefs. http://unity3d.com/support/documentation/ScriptReference/PlayerPrefs.html Eg.

PlayerPrefs.SetInt("Bloom", 10);


localBloom = PlayerPrefs.GetInt("Bloom");