I have an XML file at path “Assets/Models/editor.xml”.
If I want to access that using a C# script, no matter what directory my script file is in, I always have to use “Assets/Models/editor.xml”.
Fair enough, but my editor.xml makes use of src attributes to reference other xml files in the path “Assets/Models/”.
Normally since the xml files are in the same folder, using src=“other_xml_file.xml” should work just fine.
However, with Unity, both src=“other_xml_file.xml” and src=“Assets/Models/other_xml_file.xml” are not working.
Application.dataPath gives path to Assets folder of current project.
And use full path so no need to change working directory.
Apparently it’s just that the src attribute is not natively supported by Mono nor is XInclude. You can use entities if you set XmlReaderSettings.ProhibitDtd to false.