Table of Contents

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

entity Entity

Returns

NetworkEntityId

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

name string

Returns

Entity

SetNetworkEntityId(Entity, NetworkEntityId)

Assigns the live network identity claimed when the composition commits.

public void SetNetworkEntityId(Entity entity, NetworkEntityId id)

Parameters

entity Entity
id NetworkEntityId

SetStableEntityId(Entity, StableEntityId)

Assigns the World-local stable identity claimed when the composition commits.

public void SetStableEntityId(Entity entity, StableEntityId id)

Parameters

entity Entity
id StableEntityId