I'm reading game configuration parameters from an XML file that I created. I made a folder called "Resources" in my project's Assets folder, and placed the XML file in it. When working in Edit Mode, I can modify the XML parameters, run the game, and observe the changes that I have made. However, when I build and release it, editing the XML file does nothing.
I'm building as a Windows exe.
Is it a linker problem?
As a reference, here is the code that I'm using (yes, it's rough, but I just wanted to get a proof of concept working)
var asset:TextAsset = Resources.Load("xmltest");
if(asset != null)
{
var reader:XmlTextReader = new XmlTextReader(new StringReader(asset.text));
while(reader.Read())
{
if(reader.Name == "item")
{
if (reader.GetAttribute("id") == "editedJump")
{
jump.extraHeight = parseInt(reader.GetAttribute("label"));
}
if (reader.GetAttribute("id") == "editedWalk")
{
movement.walkSpeed = parseInt(reader.GetAttribute("label"));
}
}
}
}