Photon Quantum 2.1.1

Public Attributes | Properties | List of all members
Quantum.EntityRef Struct Reference

Quantum entity reference. More...

Inherits IEquatable< EntityRef >.

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 EntityRef None [get]
 The EntityRef value defining a non-existent Entity. More...
 

Detailed Description

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.

Member Data Documentation

◆ IsValid

bool Quantum.EntityRef.IsValid => Raw != 0

Returns false if this entity is equal to EntityRef.None

◆ Index

int Quantum.EntityRef.Index

Entity index.

◆ Version

int Quantum.EntityRef.Version

Entity version is incremented during the entity life cycle when the entity slot is reused.

Property Documentation

◆ None

EntityRef Quantum.EntityRef.None
staticget

The EntityRef value defining a non-existent Entity.