Struct Entity
- Namespace
- KeenEyes
- Assembly
- KeenEyes.Abstractions.dll
Represents an entity in the ECS world. An entity is essentially just an ID - components give it data and behavior.
public readonly record struct Entity : IEquatable<Entity>
- Implements
- Inherited Members
Constructors
Entity(int, int)
Represents an entity in the ECS world. An entity is essentially just an ID - components give it data and behavior.
public Entity(int Id, int Version)
Parameters
IdintThe unique identifier for this entity.
VersionintGeneration counter to detect stale references.
Fields
Null
A null/invalid entity reference.
public static readonly Entity Null
Field Value
Properties
Id
The unique identifier for this entity.
public int Id { get; init; }
Property Value
IsValid
Whether this entity reference is valid (non-null).
public bool IsValid { get; }
Property Value
Version
Generation counter to detect stale references.
public int Version { get; init; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.