Search Unity

Windows phone 8 build, loading xml file (path)

Discussion in 'Windows' started by 2FlyDreams, Nov 8, 2013.

Thread Status:
Not open for further replies.
  1. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    I use this code to load xml file and it works great in Unity ( path to xml file : ... Assets/Text Quests/TestTextQuest.xml):

    Code (csharp):
    1.  XDocument document = XDocument.Load(Application.dataPath + "/Text Quests/TestTextQuest.xml");
    but when I deploy it on my windows phone 8, doesn't load xml, and show this ( made screenshot ) : $wp_ss_20131108_0002.png
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Well, the error kind of explains itself. Use relative path instead of absolute one.
     
  3. 2FlyDreams

    2FlyDreams

    Joined:
    Oct 18, 2013
    Posts:
    42
    Yeah, ty, I have already solved this problem!)
     
Thread Status:
Not open for further replies.