Unity3d插件推荐:组件保存系统Component Save System

分类栏目:unity3d教程

196

谷歌机译:什么是组件保存系统?

英文官方原文:What is Component Save System?

谷歌机译:一个免费的存储系统,它是为了与当前的统一组件系统共存而开发的。

英文官方原文:A free save system that is developed to co-exist with the current component system of Unity.

谷歌机译:最新版本手册(V1.1)

英文官方原文:Manual for the latest version (V1.1)

谷歌机译:演示功能的WEBGL游戏演示示例

英文官方原文:WEBGL Game demo sample that demonstrates features

谷歌机译:相关信息:

英文官方原文:Still relevant information:

谷歌机译:关于它如何工作的博客文章。主要集中在前一个版本上。071.071版

英文官方原文:Blogpost on how it works. Mainly focused on the previous version. (V1.071)

谷歌机译:上一个免费版本的Github链接。(第1071节)

英文官方原文:Github link for the previous, free version. (V.1071)

谷歌机译:另一个统一的拯救系统?

英文官方原文:Another save system for Unity?

谷歌机译:此解决方案与其他解决方案的不同之处在于,您只需为每个组件(脚本)编写一个保存实现。这样做的好处是,每个具有名为“Saveable”的组件的对象将被唯一地保存。

英文官方原文:How this solution differs from others is that you only have to write a save implementation per component (script). This comes with the benefit that each object that has a component called "Saveable" will be saved uniquely.

谷歌机译:可以复制50个对象,这些对象使用实现ISaveable的相同组件。所有这些对象仍然可以单独保存。因为一个可保存的组件有一个全局唯一标识符,并且不允许重复,所以会生成一个新的ID。如果您希望能够轻松地保存多个npc的状态,这将非常有用。

英文官方原文:You could duplicate 50 objects that use the same components that implement ISaveable. And all these objects would still get saved individually. Since a Saveable Component has a global unique identifier, and duplicates are not allowed, so a new ID gets generated. This is useful in case you want to be able to easily save the state of multiple NPCS.

谷歌机译:它在实践中是如何工作的?

英文官方原文:How does it work in practice?

谷歌机译:您可以将一个名为“Saveable”的组件添加到要保存的游戏对象的根目录中。这是一个获取实现ISaveable的所有组件的组件。saveable组件响应SaveMaster发送的同步请求。

英文官方原文:You add a component called "Saveable" to the root of a GameObject which you want to save. This is a component that fetches all components that implement ISaveable. The saveable component responds to sync requests sent by the SaveMaster.

谷歌机译:当SaveGame被销毁时,SaveGame也会保存到SaveGame中,但是在SaveMaster决定实际保存之前,不会将任何内容写入磁盘。销毁对象在SaveGame对象上设置数据的好处是可以防止对象在保存操作期间被排除。例如,当你离开一个房间时,所有的东西都被设置好了,但还没有写入文件。如果您希望有特定的“保存点”,而不想考虑另一个房间中的对象是如何保存或加载的,那么这是非常好的。

英文官方原文:Saving to the SaveGame is also done by the Saveable when it gets destroyed, however nothing gets written to disk until the SaveMaster decides to actually save. The benefit of having destroyed objects set data on the SaveGame object is that it prevents objects from being excluded during a save action. So for instance when you exit a room, everything gets set but not written yet to file. This is great if you want to have specific "Save Points" and you don't want to think about how the objects in the other room get saved or loaded.

谷歌机译:特征

英文官方原文:Features

Unity3d插件:组件保存系统Component Save System

谷歌机译:*轻松保存同一对象的多个实例(预置)。例如,新的敌人在一个级别。

英文官方原文:* Easily save multiple instances (prefabs) of the same object. For instance, new enemies in a level.

谷歌机译:*数据以JSON格式存储在一个平面结构中,dictionary用于快速键检索

英文官方原文:* Data is stored as JSON in a flat structure, dictionary is used for fast key retrieval

谷歌机译:*包括源代码

英文官方原文:* Source code is included

谷歌机译:*很容易编写一个实现来保存组件

英文官方原文:* Easy to write a implementation to save your component

谷歌机译:*存储Float、Int、String之类的playerprefs,但是使用SaveMaster

英文官方原文:* Store Float, Int, String like playerprefs, but then instead by using the SaveMaster

谷歌机译:*可保存的简易预制件。(目前仅提供资源文件夹,Adressables即将实现)

英文官方原文:* Easily prefabs that are saveable. (Resources folder only for now, Adressables implementation coming soon)

谷歌机译:(新的!)*写入二进制和SQLite(Beta),并在存储类型之间转换

英文官方原文:(New!) * Writing to Binary and SQLite (Beta), and converting between save types

谷歌机译:(新的!)*将屏幕截图保存到元数据,将屏幕截图加载到原始图像

英文官方原文:(New!) * Saving screenshot to metadata, loading screenshot to raw image

谷歌机译:(新的!)*保存文件的AES加密

英文官方原文:(New!) * AES encryption of save files

谷歌机译:(新的!)*保存和加载上次使用的场景

英文官方原文:(New!) * Saving and loading of last used scenes

谷歌机译:(新的!)*游戏模板和主菜单和暂停屏幕菜单模板。

英文官方原文:(New!) * Game template and Main menu & Pause screen menu templates.

谷歌机译:(新的!)*使用scriptableobject而不是字符串字段来设置ID

英文官方原文:(New!) * Use scriptableobject instead of a string field to set ID's

谷歌机译:(新的!)*临时插槽加载,用活动插槽覆盖插槽

英文官方原文:(New!) * Temporary slot loading, overwrite slot with active slot

谷歌机译:(新的!)*将数据保存到自定义元数据文件

英文官方原文:(New!) * Save data to a custom metadata file

谷歌机译:在以下平台上测试

英文官方原文:Tested on the following platforms

谷歌机译:Windows/Linux系统

英文官方原文:Windows / Linux

谷歌机译:安卓

英文官方原文:Android

谷歌机译:网络GL

英文官方原文:WebGL

谷歌机译:目前还没有得到证实,但在大多数平台上还没有得到证实。

英文官方原文:Most likely works on more platforms, but not confirmed yet.