将 json 序列化到 content 文件夹
我一直在使用资源管理器从内容文件夹中读取 json 文件来填充我的关卡。是否有一种我不知道的方法可以让我将文件写入我的内容文件夹?我一直在使用标准的java编写器,但它限制了我的代码到特定的平台。
I've been reading json files from my content folder using the asset manager to fill my levels. Is there a method that I am not aware of that would allow me to also write files into my content folder? I've been using the standard java writer, but it limits my code to a specific platform.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法通过 PlayN API 写入文件。 PlayN 游戏可以编译为 JavaScript 并部署在 Web 浏览器中。没有 HTML5 API 允许您将任意数据写入文件系统。有建议的 API,但它们涉及弹出“另存为...”对话框,并且在任何情况下都没有广泛使用。
You cannot write files via PlayN APIs. PlayN games can be compiled to JavaScript and deployed in web browsers. There is no HTML5 API that allows you to write arbitrary data to the file system. There are proposed APIs, but they involve popping up "Save as..." dialogs and they are not widely available in any case.