selene.entities
Provides access to entities and the ability to create new ones.
| Function |
|---|
Create(entityDef: string): EntityCreate(entityDef: EntityDefinition): Entity |
Creates a new entity from an entity definition.
The entity will be saved and synchronized with clients. |
CreateTransient(entityDef: string): Entity | nilCreateTransient(entityDef: EntityDefinition): Entity | nil |
Creates a new transient entity from an entity definition.
Transient entities are not assigned a network id - spawning them is fire-and-forget. |
GetByNetworkId(networkId: number): Entity | nil |
Retrieves an entity by its network ID.
Returns the entity if found, otherwise returns nil. |