Using an XML file to tweak variables after build?

I was wondering whether or not this was possible?

Would I be able to, once a game has been built, simply edit an XML file stored in the same game_data folder that would contain, say, Speeds of characters, jump heights etc and not have to rebuild the whole game just to change one variable?

(A better example) β†’
So upon loading of the *.exe file, the game reads my XML file and applies the variable tweaks in the game, to save me having to rebuild the game every time I change something as small as a characters move speed for example.

I remember friends used to do this with Flash games, and I was wondering if it’s possible to do this with a Unity game.

As ever, I muchly appreciate any and all help/insight into my inquiry, and a massive thanks to you all!

Of course you can, XML is just text. You can deserialize it into an object when you load a scene, hell you could create your own in game editor to serialize it back to xml if you wanted(in case you have beta testers or something).

An example from a previously answered question(Learning how to deserialize xml file - Unity Answers). The links explain my favorite way of designing xml documents, which is to decorate the classes with attributes that describe the xml structure, after that, (de)serializing is quite simple.

		public static T DeserializeSettingsTemplate<T>(string path)
		{
			using(TextReader r = new StreamReader(path))
			{
				XmlSerializer s = new XmlSerializer(typeof(T));

				return (T)s.Deserialize(r);
			}
		}

		public static void SerializeSettingsTemplate(object dataToSerialize, string path)
		{
			using(TextWriter w = new StreamWriter(path))
			{
				XmlSerializer s = new XmlSerializer(dataToSerialize.GetType());

				s.Serialize(w, dataToSerialize);
			}
		}