Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

How to edit an XML file in Streamingassets from my hololens?

Discussion in 'AR' started by hassehans, May 6, 2019.

  1. hassehans

    hassehans

    Joined:
    Oct 24, 2017
    Posts:
    1
    Hi!

    I have a really frustrating problem with my app, I'm using Vuforia and I'm trying to edit and save an xml in streamingassets from runtime, however, I get the following exception:

    Unauthorizedaccessexception ... access to the path is denied.

    I use the following when I get this error(only on the hololens, not in the editor):
    Code (CSharp):
    1. var path = Path.Combine(Application.streamingAssetsPath, "xx.xml");
    but when I save something to:
    Code (CSharp):
    1. var path = Path.Combine(Application.persistentDataPath, "xx.xml");
    it works perfectly. I can't do this though because of Vuforia can only access image targets in Streamingassets. So does anyone have an idea what I'm doing wrong, what can I do to gain access to the streamingassets folder?

    Thank you!