Script serialization
Details of how Unity transforms your scripted data structures and object states into a serialized format for storage or reconstruction later on, and how this affects your application performance.
阅读时间1 分钟最后更新于 24 天前
Serialization is the automatic process of transforming data structures or GameObject states into a format that Unity can store and reconstruct later.
How you organize data in your Unity project affects how Unity serializes that data, which can have a significant impact on the performance of your project. This page outlines serialization in Unity and how to optimize your project for it.
Topic | Description |
|---|---|
| Serialization rules | Conditions that determine whether fields in your scripts are serialized. |
| Serialization rules analyzer | The Unity serialization rules analyzer helps you write correct serialization code by detecting common mistakes at compile time. |
| Custom serialization | How to serialize additional items not supported by Unity's serializer. |
| Dictionary serialization | Serialize |
| Migrate a custom dictionary solution to built-in dictionary serialization | Migrate a dictionary field from a custom solution to built-in dictionary serialization. |
| How Unity uses serialization | More details about how serialization works in Unity. |
| JSON Serialization | Convert Unity objects to and from JSON format using the JsonUtility class. |
| Serialization best practices | Best practices for serialization. |