Unity Hololens 开发中的 FilePickers 问题

Trouble with FilePickers in Unity Hololens development

我在 how to get started with file pickers 上找到了一个很棒的参考资料。但话虽如此,我无法让提供的代码适用于我的 Unity Hololens 应用程序。

我的场景: 我有一个文件,可以说是一个目标文件,比如 3DModel.obj。我希望我的应用程序能够在 运行 时间找到此文件 (3DModel.obj),然后在 运行 时间加载它。

我正在尝试使用这些 read/write 函数,但我无处可去。我已经 运行 使用了许多函数,例如 Windows.Storage.ApplicationData.Current.RoamingFolder、KnownFolder、LocalFolder、dataPath、persistentDataPath。

我已经仔细阅读了 Microsofts 文件选择器文档,但我仍然摸不着头脑。

None 这些似乎完成了我正在尝试做的事情,或者我的无能和缺乏关于如何使用文件选择器的知识无法完成工作。

Limitations of the HoloLens shell:

File Explorer and Local File System

The Windows Holographic app model does not currently expose the concept of a file system. There are known folders, but there is no built in, local File Explorer app like on Windows Desktop or Mobile. Apps can save files to their local state folders. Apps can also save files to a registered File Picker app like OneDrive.