Scripting API
Scripting API
SceneOverride
Class in Abyss.Core.Scenes, from Abyss.Core.
One thing a scene changed, or added, below the root of a prefab instance.
public sealed class SceneOverrideRemarks
Two readings of one record, and which one it is depends on SceneOverride.Parent. Without a parent it changes the entity the prefab already has under that SceneOverride.Id. With one it is a new entity, hung under whichever entity of the instance that parent names.
Why not two lists. They carry the same fields, they are resolved against the same map of ids, and an addition under an addition is the same resolution one step further — so two lists would be one mechanism written twice, with an ordering rule between them that this does not need.
An override that names nothing is a note, not a failure. A prefab is edited by somebody else, on their own schedule, and an entity a scene was leaning on can simply stop existing. The scene still opens, without that change, and says what it could not apply.
Properties
Id
public required ulong Id { get; init; }Which entity of the instance this is about. See SceneEntity.Id.
For a change, the id the prefab gave the entity. For an addition, an id this scene minted for the entity it is adding — which is what lets a later addition be hung underneath it.
Parent
public ulong? Parent { get; init; }The id of the entity this one hangs from, which is what makes this an addition.
null for a change to something the prefab already has. A parent that names nothing in the instance is a note, and the entity is hung off the instance's root rather than dropped: a scene that loses an entity because a prefab moved one is worse than a scene with an entity in the wrong place, and only one of the two is visible.
Name
public string? Name { get; init; }What to call it, or null to leave the prefab's name alone.
Mesh
public string? Mesh { get; init; }The mesh asset's key in this document, or null to follow the prefab.
Material
public string? Material { get; init; }The material asset's key in this document, or null to follow the prefab.
Components
public List<SceneComponent> Components { get; init; }The fields that differ, merged over the prefab's the way the root's are.
Prefab
public string? Prefab { get; init; }For an addition that is an instance of a prefab, the prefab asset's key in this document; null for a change, and for an entity of the scene's own.
An instance put inside another, built of its prefab where it hangs as an instance in the scene is: SceneOverride.Name, SceneOverride.Mesh, SceneOverride.Material and SceneOverride.Components are what it changed of the prefab's root, and SceneOverride.Overrides what it changed and added below it, against its own prefab's names.
The scene's, not the prefab's: it is an instance of its own, unpacked, moved and deleted as one in the scene is, and built again with the one it is in. Version 10 and later; see SceneDocument.CurrentVersion.
Overrides
public List<SceneOverride> Overrides { get; init; }For an added instance, what this scene changed or added below its root, or empty; see SceneEntity.Overrides.
Removed
public List<string> Removed { get; init; }For a change, the components the prefab gives the entity that the scene took off, by name, or empty; for an added instance, those of its prefab's root.
Taken off before what SceneOverride.Components says is merged over the rest, so a component the scene took off and then put on again is the scene's own, all of it. The mesh and the material, which a file holds as SceneOverride.Mesh and SceneOverride.Material, are taken off as Mesh3d and MeshMaterial3d. Version 12 and later; see SceneDocument.CurrentVersion.
