如何使用 unity3d 创建文件并将其保存到 windows phone 上的内部存储目录中

How can I create and save files to a directory in internal storage on windows phone with unity3d

如何将文件(doc 或图像)直接保存到 windows 上的内部存储中的指定目录(第一次创建,第二次检查是否存在放置数据或创建和追加)phone 没有使用fileOpenPicker的统一?这认为我需要来自 unity3D 的 windows phone 10。任何想法,建议表示赞赏!

通常您会将数据保存在 Application.persistentDataPath. Most of System.IO.File is available for UWP apps so you can use that directly. If you're targeting Windows Phone 8.1 then use the alternate UnityEngine.Windows.File

如果您想让用户指定一个目录或使用一个库,那么您需要从 Unity 提供的内容中分支出来并使用底层的 WinRT StorageFile API。参见 Quickstart: Reading and writing files

要在 Unity 中调用 WinRT 类,请将它们包装在#if NETFX_CORE 或 #if WINDOWS_UWP 块中,这样就不会在不支持的上下文(例如 Unity 编辑器)中调用无法访问 Windows 运行时。

有关详细信息,请参阅 Unity3d Windows Store Apps 文档。