Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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

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

  1. hassehans


    Oct 24, 2017

    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!