Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Immersive .appx unable to access Files on Desktop or external files ? (Unity)

EvoxVREvoxVR
edited November 2017 in Q&A and Discussions

Hello everyone, We are working on a demo and in our demo we have some assets Stored withing a folder located on our desktop . In the unity editor all is well and the app is able to read the files just fine however when I export the build a bug is occurring as if those files are missing or that path is incorrect yet like I said in the editor it works perfectly fine.

I've seen similar issues before and it usually comes down to a missing permission or something has anyone tried something similar and did you have to enable the ability for the .appx build of your project to read external files on the desktop or in an external file system ?

I enabled the Removable Storage capability hoping it would help but it did not .

Tagged:

Answers

  • Options

    Have you had a look at the file access permissions as they apply to a UWP app installed on a device? MSDN has details here https://docs.microsoft.com/en-us/windows/uwp/files/file-access-permissions

    Outside of the immersive world, if a UWP app wants access to a general folder then it needs to raise a folder dialog asking for that access and (if the user consents) then the app can then use that folder and if it wants to use it in future instances of the app then it would need to make use of the "future access list" as documented here https://docs.microsoft.com/en-us/windows/uwp/files/how-to-track-recently-used-files-and-folders

    For an immersive app, this folder picking might not be so practical and so perhaps it would be better to give the application the capability to access one of the known folders (e.g. music, pictures, video) and put the files in there so that it can access them without having to prompt the user?

    Or...if these are assets that live within the app then perhaps they could live in the app's package and be accessed from there or maybe be download into the app's private storage when the app is run for the first time?

    Hope that helps.

  • Options

    This is valuable info thank you , I will look into moving the assets to another folder that we can more easily access since that seems like the fastest method.

  • Options

    @mtaulty Thank you again for an excellent lead but somehow that's not fixing my problem . I moved the folder to Pictures , and even tried to place it specifically in the persistent data path . it continues to work in editor but not the exported .appx package and I've quadruple checked my build capabilities. I may have to look for a solution for loading these images within my project unfortunately.

Sign In or Register to comment.