Skip to content

Class WorldSnapshot

Namespace: Apogee.Ecs
Assembly: Apogee.Ecs.dll

The user entities of a world as they were (Snapshot), or a part of them (SnapshotTree): ids, names, parents and component bytes. Restoring it brings the entities back under the same ids, so a selection, an undo history or a reference between entities stays valid. A snapshot names its components by their description, not by their id in the world it was taken from, so it can be restored into another world (a new session after a play run): the entities come back under the same ids there too. Fields that hold an asset (a model of a ModelRenderer) are kept as the they named: restored into the world they came from they are the same handles, into another world they are that world's handles for the same assets.

public sealed class WorldSnapshot

Inheritance

object ← WorldSnapshot

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

Count

public int Count { get; }

Property Value

int

Ids

The ids of the entities in it.

public IEnumerable<Entity> Ids { get; }

Property Value

IEnumerable<Entity>