Unity Serialization
来源:互联网 发布:淘宝代运营 公司发展 编辑:程序博客网 时间:2024/05/16 10:54
http://blogs.unity3d.com/2012/10/25/unity-serialization/
一些要点:
What happens when an assembly is reloaded?
When you enter / exit play mode or change a script Unity has to reload the mono assemblies, that is the dll’s associated with Unity.
On the user side this is a 3 step process:
- Pull all the serializable data out of managed land, creating an internal representation of the data on the C++ side of Unity.
- Destroy all memory / information associated with the managed side of Unity, and reload the assemblies.
- Reserialize the data that was saved in C++ back into managed land.
Some Serialization Rules
- Avoid structs
- Classes you want to be serializable need to be marked with [Serializable]
- Public fields are serialized (so long as they reference a [Serializable] class)
- Private fields are serialized under some circumstances (editor).
- Mark private fields as [SerializeField] if you wish them to be serialized.
- [NonSerialized] exists for fields that you do not want to serialize.
0 0
- Unity Serialization
- Unity3D:Unity Serialization
- unity 5.3 的 JSON Serialization
- unity 5.3 的 JSON Serialization
- Tricks of Serialization in Unity/C#
- unity序列化系统小结-来自unity手册(Script Serialization)
- serialization
- Serialization
- Serialization
- Serialization
- Serialization
- Serialization
- Serialization
- Unity Interface Serialization-Expose Interface field In Inspector
- 序列化 (Serialization)的几段定义及在Unity中的使用
- 序列化 (Serialization)的几段定义及在Unity中的使用
- Serialization指南
- Object Serialization
- jQuery文件下载插件 Downloadr
- 为什么不用网页文件做办公文档
- RMAN 备份与恢复 实例
- 使用javaMail收邮件
- jquery图片上下翻滚、图片左右翻滚、图片淡隐淡现3种图片滚动特效
- Unity Serialization
- Cracking the coding interview--Q1.5
- 《深入理解Nginx》第2版修订前读者意见征求帖
- java中的intern()
- jQuery.Autocomplete实现自动完成功能(详解)
- 关于沟通
- cocos2d-x学习日志(14) --A星寻路算法之45度地图
- 文件生成MD5 收藏
- android兼容性测试解决一(转载)