KernelAPI reference
Struct EntityId
Namespace: MicroEngine.Scenes
Assembly: MicroEngine.Scene.dll
Guide: Scenes
An entity of an IWorld: a slot index and the generation of the entity that held the slot when the id
was made. A destroyed entity’s slot is reused with a new generation, so an old id never reaches the new entity.
default is None (generation 0 is never issued).
public readonly struct EntityId : IEquatable<EntityId>Implements
Constructors
EntityId(uint, uint)
An entity of an IWorld: a slot index and the generation of the entity that held the slot when the id
was made. A destroyed entity’s slot is reused with a new generation, so an old id never reaches the new entity.
default is None (generation 0 is never issued).
public EntityId(uint Index, uint Generation)Parameters
Index uint
The slot.
Generation uint
The generation of the slot’s entity; 0 only for None.
Properties
Generation
The generation of the slot’s entity; 0 only for None.
public uint Generation { get; init; }Property Value
Index
The slot.
public uint Index { get; init; }Property Value
IsNone
Whether this is None.
public bool IsNone { get; }Property Value
None
The id of no entity.
public static EntityId None { get; }Property Value
Methods
Deconstruct(out uint, out uint)
public void Deconstruct(out uint Index, out uint Generation)Parameters
Index uint
Generation uint
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(EntityId)
public bool Equals(EntityId other)Parameters
other EntityId
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(EntityId, EntityId)
public static bool operator ==(EntityId left, EntityId right)Parameters
left EntityId
right EntityId
Returns
operator !=(EntityId, EntityId)
public static bool operator !=(EntityId left, EntityId right)Parameters
left EntityId
right EntityId