Table of Contents

Class EntitiesManager

Namespace
Coherence.Toolkit
Assembly
Coherence.Toolkit.dll
public sealed class EntitiesManager
Inheritance
EntitiesManager

Constructors

EntitiesManager(ICoherenceBridge, CoherenceClientConnectionManager, CoherenceInputManager, UniquenessManager, IDefinition, Logger)

public EntitiesManager(ICoherenceBridge bridge, CoherenceClientConnectionManager clientConnectionsManager, CoherenceInputManager inputManager, UniquenessManager uniquenessManager, IDefinition definition, Logger logger)

Parameters

bridge ICoherenceBridge
clientConnectionsManager CoherenceClientConnectionManager
inputManager CoherenceInputManager
uniquenessManager UniquenessManager
definition IDefinition
logger Logger

Fields

internalEntities

A set of known non-toolkit entities.

public HashSet<Entity> internalEntities

Field Value

HashSet<Entity>

Properties

ConnectionEntityID

public Entity ConnectionEntityID { get; }

Property Value

Entity

EntityCount

public int EntityCount { get; }

Property Value

int

NetworkEntities

public IEnumerable<NetworkEntityState> NetworkEntities { get; }

Property Value

IEnumerable<NetworkEntityState>

Methods

EntityIdToCoherenceSync(Entity)

Get the CoherenceSync for a Entity.

public ICoherenceSync EntityIdToCoherenceSync(Entity from)

Parameters

from Entity

Returns

ICoherenceSync

EntityIdToGameObject(Entity)

Get the GameObject for a Entity.

public GameObject EntityIdToGameObject(Entity from)

Parameters

from Entity

Returns

GameObject

EntityIdToRectTransform(Entity)

Get the RectTransform for a Entity.

public RectTransform EntityIdToRectTransform(Entity from)

Parameters

from Entity

Returns

RectTransform

EntityIdToTransform(Entity)

Get the Transform for a Entity.

public Transform EntityIdToTransform(Entity from)

Parameters

from Entity

Returns

Transform

GetCoherenceSyncForEntity(Entity)

Get a CoherenceSync from the mapper.

public ICoherenceSync GetCoherenceSyncForEntity(Entity id)

Parameters

id Entity

A valid Entity (meaning it exists in the mapper)

Returns

ICoherenceSync

GetEnumerator()

public Dictionary<Entity, NetworkEntityState>.Enumerator GetEnumerator()

Returns

Dictionary<Entity, NetworkEntityState>.Enumerator

GetNetworkEntityStateForEntity(Entity)

Get a Network Entity State from the mapper.

public NetworkEntityState GetNetworkEntityStateForEntity(Entity id)

Parameters

id Entity

A valid Entity (meaning it exists in the mapper)

Returns

NetworkEntityState

InterpolateBindings(InterpolationLoop)

public void InterpolateBindings(CoherenceSync.InterpolationLoop interpolationLoop)

Parameters

interpolationLoop CoherenceSync.InterpolationLoop

InvokeCallbacks(InterpolationLoop)

public void InvokeCallbacks(CoherenceSync.InterpolationLoop interpolationLoop)

Parameters

interpolationLoop CoherenceSync.InterpolationLoop

SampleBindings(InterpolationLoop)

public void SampleBindings(CoherenceSync.InterpolationLoop interpolationLoop)

Parameters

interpolationLoop CoherenceSync.InterpolationLoop

SetActiveScene()

Set the Active Unity Scene based on this CoherenceBridge instance. If the CoherenceBridge has an instantiation scene set, that one will be used. Otherwise it will fall back on the current scene of the Coherence Bridge game object.

public Scene? SetActiveScene()

Returns

Scene?

SyncAndSend()

public void SyncAndSend()

TryGetNetworkEntityState(Entity, out NetworkEntityState)

public bool TryGetNetworkEntityState(Entity id, out NetworkEntityState networkEntityState)

Parameters

id Entity
networkEntityState NetworkEntityState

Returns

bool

UnityObjectToEntityId(CoherenceSync)

Get the Entity for a CoherenceSync.

public Entity UnityObjectToEntityId(CoherenceSync from)

Parameters

from CoherenceSync

Returns

Entity

UnityObjectToEntityId(GameObject)

Get the Entity for a GameObject with CoherenceSync.

public Entity UnityObjectToEntityId(GameObject from)

Parameters

from GameObject

Returns

Entity

UnityObjectToEntityId(Transform)

Get the Entity for a Transform with CoherenceSync.

public Entity UnityObjectToEntityId(Transform from)

Parameters

from Transform

Returns

Entity