简体   繁体   English

在 Unity 开发中使用 FileOpenPicker 应用程序合约 Hololens 2

[英]Using FileOpenPicker app contract Hololens 2 with Unity development

Similar to this post I am trying to implement FileOpenPicker into my hololens 2 app.这篇文章类似,我正在尝试将 FileOpenPicker 实现到我的 hololens 2 应用程序中。 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#.我知道我在上面链接的帖子将您定向到 FileOpenPicker,这是我一直在尝试做的,但我对他们拥有的样本以及如何在统一 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.还有这篇文章有助于如何使用 FileOpenPicker,但它针对的是独立的 UWP 应用程序,而不是统一构建的东西。

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.因此,对于任何偶然发现这篇文章的人来说,截至 2021 年 2 月 8 日,在 Hololens 2 上没有安装其他应用程序的情况下使用 FileOpenPicker 将无法正常工作。

It took me forever to find this post but here's a partial answer Open local data path with FileOpenPicker我花了很长时间才找到这篇文章,但这是部分答案Open local data path with FileOpenPicker

So to make a TL;DR about that post.所以做一个 TL; DR 关于那个帖子。 FileOpenPicker DOES work on Hololens, however, it works through externally installed File picker like OneDrive. FileOpenPicker 可以在 Hololens 上工作,但是,它可以通过像 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.编辑:如果有人偶然发现这个问题,我设法在这篇文章中解决了我的问题,希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM