Table of Contents

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

Id int

The unique identifier for this entity.

Version int

Generation counter to detect stale references.

Fields

Null

A null/invalid entity reference.

public static readonly Entity Null

Field Value

Entity

Properties

Id

The unique identifier for this entity.

public int Id { get; init; }

Property Value

int

IsValid

Whether this entity reference is valid (non-null).

public bool IsValid { get; }

Property Value

bool

Version

Generation counter to detect stale references.

public int Version { get; init; }

Property Value

int

Methods

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.