Forum Discussion
sapanda
10 years agoExplorer
Unable to read XML with Mobile SDK 0.5.0 + Unity 5
I just migrated to mobile 0.5.0 and Unity 5 in one go and I'm facing the following issue only in release mode (i.e. not when the "Development Build" flag is checked) any time I try to read an xml file from the Note 4 storage:
Everything ran fine in previous versions, and still runs fine in the "Development Build". Anyone know why this might be happening?
Thanks,
Saswat
UnauthorizedAccessException: Access to the path "/sdcard/Oculus/Product/Settings.xml" is denied.
Everything ran fine in previous versions, and still runs fine in the "Development Build". Anyone know why this might be happening?
Thanks,
Saswat
1 Reply
Replies have been turned off for this discussion
- sapandaExplorerIssue resolved.
I was reading the filestream like this:FileStream stream = new FileStream(filename, FileMode.Open);
Unfortunately using this filestream constructor always opens with ReadWrite permissions. And I guess the release build for Unity 5 is stricter about those permissions? Anyhow, this does the trick:FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read);
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 years ago
- 1 month ago
- 3 months ago