- Home /
Question by
miyoku · Jan 07, 2015 at 02:47 PM ·
xmlpathresources.loadstreamingassets
How to check the path on Android
Hello So, I try to access to some XML file on my Android application. I put them in my StreamingAssets folder and recovering them by Application.streamingAssetsPath.
This is my code for getting the path:
int index=0;
index=m_RuleBaseFilePath.LastIndexOf("/");
string path= m_RuleBaseFilePath.Substring(index,m_RuleBaseFilePath.Length-index);
TextAsset textAsset = (TextAsset)Resources.Load(path, typeof(TextAsset));
string realpath=Application.streamingAssetsPath+path;
This code works in the editor and for windows but not for Android when i try to build and run. I ask myself if i get the good path with this method.
Thanks for your help.
Comment