Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Text-based scene files

Work with Unity's text-based YAML scene format for version control and scene generation.
Read time 1 minuteLast updated 19 days ago

Unity provides a text-based format for scene data, in addition to the default binary format. This can be useful when working with version control software, because text files generated separately can be merged more easily than binary files. Also, the text data can be generated and parsed by tools, making it possible to create and analyze scenes automatically. The pages in this section provide some reference material for working with the format.

Topic

Description

Format of text serialized filesUnderstand the structure and syntax of Unity's text-based serialization format for scenes and assets.
UnityYAMLLearn about Unity's implementation of YAML and the specific conventions used in scene files.
An example of a YAML scene fileAn example of a scene file in YAML format with explanations of key elements.
YAML serialization of prefabsUnderstand how prefab instances, nested prefabs, and prefab variants are represented in YAML.
Example of YAML prefab serializationAnnotated YAML excerpts of prefab instances, nested prefabs, and prefab variants from real files.
YAML class ID referenceReference list of class IDs used in YAML files to identify different Unity object types.

Additional resources