Opening an XML in Unity3D when the game is built

Posted by N0xus on Game Development See other posts from Game Development or by N0xus
Published on 2012-11-23T11:31:02Z Indexed on 2012/11/23 17:20 UTC
Read the original article Hit count: 310

Filed under:
|
|

At the moment, my game can open up an XML file inside the editor when I run it. In my XMLReader.cs I'm loading in my file like so:

_xmlDocument.Load(Application.dataPath + "\\HV_Settings\\Settings.xml");

This class also deals with what the XML should do once it has been read in.

However, when I build the game and run the exe, this file isn't called. I know that I can store this file in the C drive, but I want to keep everything in one place so when I start to release what I'm working on, the user doesn't need to do anything.

Am I doing something silly which is causing the XML not to be read?

© Game Development or respective owner

Related posts about c#

Related posts about unity