Quantum entity reference. More...
Inherits IEquatable< EntityRef >.
Public Member Functions | |
string | GetName (FrameBase frame) |
Converts entity to a name, used throughout the editor. Can be overriden with GetEntityNameUser delegate. More... | |
Public Attributes | |
int | Index |
Entity index. More... | |
bool | IsValid => Raw != 0 |
Returns false if this entity is equal to EntityRef.None More... | |
int | Version |
Entity version is incremented during the entity life cycle when the entity slot is reused. More... | |
Properties | |
static EntityRefGetNameUserDelegate | GetEntityNameUser [get, set] |
A delegate invoked in GetName. If there is no frame available, the frame delegate parameter will be passed as null. If the delegate is null or returns null, the result of ToString will be returned. More... | |
static EntityRef | None [get] |
The EntityRef value defining a non-existent Entity. More... | |
Quantum entity reference.
Quantum implements a sparse-set ECS model (similar to enTT). This means entities are just references to collections of components.
Most important advantages: memory consumption is proportional to instantiated entities + ability to add and remove components dynamically.
|
inline |
Converts entity to a name, used throughout the editor. Can be overriden with GetEntityNameUser delegate.
bool Quantum.EntityRef.IsValid => Raw != 0 |
Returns false if this entity is equal to EntityRef.None
int Quantum.EntityRef.Index |
Entity index.
int Quantum.EntityRef.Version |
Entity version is incremented during the entity life cycle when the entity slot is reused.
|
staticget |
The EntityRef value defining a non-existent Entity.
|
staticgetset |
A delegate invoked in GetName. If there is no frame available, the frame delegate parameter will be passed as null. If the delegate is null or returns null, the result of ToString will be returned.