# Code reload and serialization

> Understand when Unity reloads compiled code, and how it preserves the state of objects across a reload.

Understand when Unity reloads compiled code, and how it preserves the state of objects across a reload.

When you change a script, the Unity Editor reloads compiled code and rebuilds the state of the objects. Unity writes object states to a serialized form and restores it afterward. The same serialization rules determine which fields appear in the Inspector window and which values persist in assets and scenes.

| **Topic**                                                                                                                                           | **Description**                                                                                                                                                                           |
| --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **[Code and scene reload on entering Play mode](/engine/6000.0/manual/programming-environment/code-reload-serialization/code-reloading-editor.md)** | Understand what Unity reloads on entering Play mode and how you can configure this behavior for faster development iteration times.                                                       |
| **[Script serialization](/engine/6000.0/manual/programming-environment/code-reload-serialization/script-serialization.md)**                         | Details of how Unity transforms scripted data structures and object states into a serialized format for storage or reconstruction later on, and how this affects application performance. |

## Additional resources

* [Script compilation](/engine/6000.0/manual/programming-environment/script-compilation.md)
* [ScriptableObject data assets](/engine/6000.0/manual/scripting/get-started/fundamental-unity-types/class-scriptable-object.md)
* [Text-based scene files](/engine/6000.0/manual/working-with-scenes/text-scene-format.md)
