Search Unity

Unity build with Windows.Storage

Discussion in 'VR' started by mverboogen, Nov 3, 2016.

  1. mverboogen

    mverboogen

    Joined:
    Nov 3, 2016
    Posts:
    2
    I'm currently trying to load files from the documents folder on the HoloLens using StorageFolder to get the path to the documents folder of the current user. I need this so the user is able to upload files from the device portal and use them inside the Unity application.

    The only problem is that I can't build my projects anymore from Unity unless I comment out all the methods that use Windows.Storage and the using statement.

    So my question is, is there something I can do so it doesn't run a piece of code when I build the project inside Unity but does run when I deploy/build my solution to the HoloLens. Or is there another way to get the Documents folder of the current user that works with Unity?

    The solution provided by HoloSheep on the HoloLens forums over here doesn't work as I'm still getting the same errors while building.
     
  2. BrandonFogerty

    BrandonFogerty

    Joined:
    Jan 29, 2016
    Posts:
    83
  3. mverboogen

    mverboogen

    Joined:
    Nov 3, 2016
    Posts:
    2
    Hi @BrandonFogerty

    I got it working, thank you.

    Just a question. Is Unity going to add the DocumentsLibrary to the capabilities options in the Player Settings? Thankfully it doesn't remove it from the manifest file if I build over an existing build so it isn't really a problem but it would be nice.