1

Similar to this post I am trying to implement FileOpenPicker into my hololens 2 app. However, I am doing this through the Mixed Reality Toolkit in unity and have been having some troubles finding out how to set up the contract within the app.

I know the post I linked above directs you to FileOpenPicker which is what I have been trying to do but I'm a bit confused about the samples they have and how to do that within unity C#.

Any recommendations on how to get this working would be a big help. Thanks!

There is also This post that helps with how to use FileOpenPicker but it's directed at standalone UWP apps and not something built in unity.

  • Could you provide more detail about what you have tried and the actual behavior? Without any specific context the above information does not make any sense to me. Besides, if you don’t know how to use the WinRT APIs in Unity projects built, please refer to here: [WinRT APIs with Unity for HoloLens](https://learn.microsoft.com/en-us/windows/mixed-reality/develop/unity/using-the-windows-namespace-with-unity-apps-for-hololens) – Hernando - MSFT Feb 05 '21 at 05:53
  • So for the behavior, I am trying to achieve is this [App Model](https://learn.microsoft.com/en-us/windows/mixed-reality/design/app-model#file-pickers) This app model is using file open picker as a call to external open pickers on the hololens. I wrap the code block for File Open Picker calls in a #if block with the directive WINDOWS_UWP but when I build and run on hololens (emulator) I am not getting any results as intended. I appreciate the link though! I think that's pointing me closer in the right direction but I still need to test solutions – Jonathan Reynolds Feb 06 '21 at 07:38

1 Answers1

0

So for anyone who stumbles across this post, as of 2/8/2021 using FileOpenPicker with no other installed apps on the Hololens 2 doesn't work.

It took me forever to find this post but here's a partial answer Open local data path with FileOpenPicker

So to make a TL;DR about that post. FileOpenPicker DOES work on Hololens, however, it works through externally installed File picker like OneDrive.

I don't know why I didn't find this post sooner until I went down every avenue to figure it out.


EDIT: I managed to solve my issue over on THIS POST if there is anyone stumbling across this issue hopefully that helps.

  • I found your post, wondering if you did get it to work with Unity and MRTK. I'm trying to use Azure to fetch blobs to local storage. Also trying to upload assets externally to call later when a user is given the device to go do work. – Larry Aultman May 22 '21 at 18:13
  • Yes, I did! I saw your comment on the solution post, so if anyone comes across this and sees these comments please visit the "EDIT:" "THIS POST" link for the solution. – Jonathan Reynolds May 23 '21 at 22:43