Hi evrybody,
I 'm using Xml data in order to load some games data. I have follow this nice script and it works like a charm inside Unity. http://www.unifycommunity.com/wiki/index.php?title=Save_and_Load_from_XML
But when i compile the game the xml data don’t load at game start. I’m compiling with the windows standalone option.
thanks for your help.
Ok after a full week end sleep i solve my problem 8) .
This was an adress problem. just had to recreate my “Xml” Folder into the Game_Data at the compilation.
Ok i found a solution but i’m not very happy with it.
I really want to compile my xml File. So I search inside the Unity manual and found this lovely methode:
Resources.load();
But I realy don’t know how to use it on a .xml Asset.
the methode to call and store into a string my xml is like this :
void LoadXML()
{
StreamReader reader = File.OpenText(fileLocation + "\\" + fileName);
string info = reader.ReadToEnd();
reader.Close();
data = info;
Debug.Log("File read");
}
i followed the script in the wiki.
I wonder how i can do the same thing using the Resource folder and then include my xml script inside the compilation.
:?:
(i’m working with C#)