Scripting API

Scripting API

BuiltPrefabs

Class in Abyss.Core.Scenes, from Abyss.Core.

The prefabs a world's instances were built from, as they were then: what tells a prefab that has changed since from one that has not, and what an instance's changes are read against.

public sealed class BuiltPrefabs

Remarks

Kept because the file is not. When a prefab changes — a model imported again, a .prefab written — its file says what it is now, and what the instances in the world were built of is gone from the disk. Telling what a scene changed inside an instance from what the prefab changed needs the prefab as the instance was built of it; so every document a build reads is kept the first time, and replaced only when the instances have been brought up to date with another (BuiltPrefabs.Settle).

Any thread.

Properties

Count

public int Count { get; }

How many prefabs are kept.

Methods

Reading

public IPrefabSource Reading(IPrefabSource current)

Prefabs read from current, each kept the first time it is: what a build reads through.

Parameters

  • current

Before

public IPrefabSource Before(IPrefabSource current)

Prefabs as the world's instances were built of them, where they were, and from current otherwise: what a capture reads what a scene changed against.

Parameters

  • current

Changed

public IReadOnlyList<AssetGuid> Changed(IPrefabSource current)

The prefabs kept that current says otherwise of now.

Parameters

  • current

A prefab current cannot read — deleted, or moved out of the project — is not among them: its instances keep what they were built of, as a scene opened now would keep nothing.

Settle

public void Settle(AssetGuid id, SceneDocument now)

Keeps now as what a prefab's instances are built of from here on.

Parameters

  • id
  • now

Clear

public void Clear()

Forgets every prefab, as opening another scene does.