- Home /
The question is answered, right answer was accepted
reference variables within my xml file.
So I have a script that uses PlayerPrefs.SetString/GetString which allows for a player to input their own name. This works successfully.
For my game, I use an xml file which contains an element (string) for my text. What I wish to do is implement the saved string from my playerprefs script, into string element within my xml file (so the players inputted name will be displayed). Essentially, can I somehow reference variables from other scripts, from within my xml file?
Thanks.
An X$$anonymous$$L file is just a file which needs to be read and written. It has no logic so to say. You need to write that logic within C#. If you want the xml to somehow know about script references, it should contain the necessary data do your C# code, when reading it, can reproduce that dependency code wise.
Got it done. Thanks for taking the time out to reply.