File formats
Every file the editor saves is YAML. Saving a loaded file gives the same bytes, so files diff cleanly.
Project: .cairnproject
The project's folder is the asset root. The file names the start scene by ID.
Version, Icon, Physics and Audio are left out when they have their default values.
Scene: .cairnscene
- Rotation is Euler angles in degrees.
- Entities are listed parent first, and the order in the file is the order of siblings.
- Each component is a key under its entity.
- Built-in meshes are written by name:
Cube,Sphere,Plane. Every other asset is written as its ID.
A script's own values for its fields are under Fields. A field that points at an entity or an asset is a small map:
Prefab: .cairnprefab
The same form as a scene, with Prefab: in place of Scene:. The first entity is the prefab's top.
In a scene, an instance of a prefab is stored as what it changed. See Prefabs.
Material: .cairnmat
Textures are added as BaseColorTexture, MetallicRoughnessTexture, NormalTexture, OcclusionTexture and EmissiveTexture, each an asset ID.
Animator: .cairnanimator
When is a condition on the parameters, written as text: Speed > 0.1 and Grounded.
Meta: .meta
One beside every asset, holding its ID.
A model's .meta also lists the IDs of its parts, under keys such as Mesh/0.
Pack: .cairnpak
An exported game's files in one binary file. The runtime mounts it as a folder, so a path into it reads like any other. Files are stored as they are, uncompressed.
Saves and settings
Saved games and the player's settings are YAML files in the game's own folder in the user's data directory. See Saving and scenes.
Compatibility
When a component gains a field, older files still load: the field takes its default. The Version in a scene is raised only for a change older engines cannot read.