- Home /
XML file not packaged with .apk
Hi all,
I am using XML files to describe certain structured in my game worlds. These files are read and parsed at runtime. In the Unity Editor,this works fine, but when I create an APK to test on my Android device, the file does not get packaged along with the rest of the Resources. I know this because the structures described in the XML file is not appearing as intended on the game. I load the XML files in code like so:
StreamReader r = new StreamReader("Assets/XML/"+xmlName );
System.Xml.XmlTextReader xr = new System.Xml.XmlTextReader(r.BaseStream);
Is there a reason why this doesn't work on a deployed app? What would be the correct way? Thanks for any help!
Your answer
![](https://koobas.hobune.stream/wayback/20220613162426im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Xml file not going in APK ... 1 Answer
change icon android apk with apktool 1 Answer
Change android version number after build 0 Answers
A node in a childnode? 1 Answer
How can I disable multitouch required=true in Andriod manifest file 1 Answer