Scripting API
Scripting API
SceneWriting
Record in Abyss.Core.Scenes, from Abyss.Core.
How a scene is written: what a project says of every scene it saves.
public record SceneWritingRemarks
Reading takes nothing of the kind. A field a file leaves out comes back as a load starts it, whichever way the file was written, so a scene written one way opens in a project set the other.
Properties
Default
public static SceneWriting Default { get; }What a project that says nothing writes: only what a load would not give back.
ForceSerializeAllFields
public bool ForceSerializeAllFields { get; init; }Whether every field of every component is written, even one a load would give the same value — what SerializeAllFieldsAttribute says of one component, said of all of them.
Off, a scene writes what somebody chose: a field holding what a load would give it is not stored. A file is short and a change to it is the change somebody made; but a default changed in a later build — the game's, or Bevy's in an upgrade — changes every scene that left that field out.
On, a scene writes every field it can hold, and every component another would bring back: a value written down keeps its meaning whatever a later build starts it as. Longer files, and a team that would rather review them than find a scene changed under it.
The editor takes it from the game's project file, where the whole team shares it: <AbyssForceSerializeAllFields>true</AbyssForceSerializeAllFields>. Either way what a file cannot hold is left out, and a prefab's instance writes only what differs from the prefab.
