Struct CompositionContext
- Namespace
- Shard.Gameplay.World
- Assembly
- Shard.Gameplay.World.dll
Restricted member-creation authority passed to composition helpers.
public readonly ref struct CompositionContext
- Inherited Members
Methods
AllocateNetworkEntityId(Entity)
Allocates and assigns a fresh live network identity for this composition.
public NetworkEntityId AllocateNetworkEntityId(Entity entity)
Parameters
entityEntity
Returns
CreateEntity()
Creates a disabled member during immediate writable execution. Identity is optional. The returned Entity is borrowed only for the current synchronous World callback.
public Entity CreateEntity()
Returns
- Entity
CreateEntity(string)
Creates a named disabled member during immediate writable execution. The returned Entity is borrowed only for the current synchronous World callback.
public Entity CreateEntity(string name)
Parameters
namestring
Returns
- Entity
SetNetworkEntityId(Entity, NetworkEntityId)
Assigns the live network identity claimed when the composition commits.
public void SetNetworkEntityId(Entity entity, NetworkEntityId id)
Parameters
entityEntityidNetworkEntityId
SetStableEntityId(Entity, StableEntityId)
Assigns the World-local stable identity claimed when the composition commits.
public void SetStableEntityId(Entity entity, StableEntityId id)
Parameters
entityEntityidStableEntityId