public readonly struct ComponentSignatureA sorted, duplicate-free set of component type ids — what makes one archetype that archetype.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Sorted so that two entities built by adding the same components in different orders land in the same archetype, and so that a serialised world walks its columns in an order that does not depend on how the entities were authored.
Fields and properties (3)
public ReadOnlySpan<ComponentTypeId> IdsThe ids, ascending.
public int CountHow many component types are in the set.
public static ComponentSignature EmptyThe set with nothing in it — the archetype a bare entity starts in.
Methods (10)
public static ComponentSignature Of(ReadOnlySpan<ComponentTypeId> unsorted)Builds a signature from ids in any order, sorting and de-duplicating them.
public bool Contains(ComponentTypeId id)Whether the set contains an id.
public ComponentSignature With(ComponentTypeId id)The set with one more id in it, or this set if it was already there.
public ComponentSignature Without(ComponentTypeId id)The set with one id taken out, or this set if it was not there.
public bool Equals(ComponentSignature other)Indicates whether the current object is equal to another object of the same type.
public override bool Equals(object? obj)Indicates whether this instance and a specified object are equal.
public override int GetHashCode()Returns the hash code for this instance.
public static bool operator ==(ComponentSignature left, ComponentSignature right)Whether two signatures name the same set.
public static bool operator !=(ComponentSignature left, ComponentSignature right)Whether two signatures name different sets.
public override string ToString()Renders the set as the component type names it holds.
Used by (14)
- ArchetypeVixen.Ecs
- ComponentNotFoundExceptionVixen.Ecs
- PrefabVixen.Engine
- SceneContentVixen.Engine
- StructuralPropertyTestsVixen.Ecs.Tests
- WorldVixen.Ecs
- WorldDigestVixen.Ecs
- WorldSerializerVixen.Engine
- WorldTestsVixen.Ecs.Tests
- SceneCloneVixen.Editor.SceneView
- SceneSerializerVixen.Editor.SceneView
- SceneStatisticsVixen.Editor.Profiler
- SubtreeSnapshotVixen.Editor.SceneView
- WorldSnapshotVixen.Editor.SceneView