Table of Contents

Class EntitiesManager

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

Constructors

EntitiesManager(IClient, CoherenceBridge, CoherenceClientConnectionManager, CoherenceInputManager, UniquenessManager, IComponentInfo)

public EntitiesManager(IClient client, CoherenceBridge bridge, CoherenceClientConnectionManager clientConnectionsManager, CoherenceInputManager inputManager, UniquenessManager uniquenessManager, IComponentInfo definition)

Parameters

client IClient
bridge CoherenceBridge
clientConnectionsManager CoherenceClientConnectionManager
inputManager CoherenceInputManager
uniquenessManager UniquenessManager
definition IComponentInfo

Properties

ConnectionEntityID

public SerializeEntityID ConnectionEntityID { get; }

Property Value

SerializeEntityID

EntityCount

public int EntityCount { get; }

Property Value

int

NetworkEntities

public IEnumerable<NetworkEntityState> NetworkEntities { get; }

Property Value

IEnumerable<NetworkEntityState>

Methods

EntityIdToCoherenceSync(SerializeEntityID)

Get the CoherenceSync for a Coherence.Entity.SerializeEntityID.

public ICoherenceSync EntityIdToCoherenceSync(SerializeEntityID from)

Parameters

from SerializeEntityID

Returns

ICoherenceSync

EntityIdToGameObject(SerializeEntityID)

Get the GameObject for a Coherence.Entity.SerializeEntityID.

public GameObject EntityIdToGameObject(SerializeEntityID from)

Parameters

from SerializeEntityID

Returns

GameObject

EntityIdToRectTransform(SerializeEntityID)

Get the RectTransform for a Coherence.Entity.SerializeEntityID.

public RectTransform EntityIdToRectTransform(SerializeEntityID from)

Parameters

from SerializeEntityID

Returns

RectTransform

EntityIdToTransform(SerializeEntityID)

Get the Transform for a Coherence.Entity.SerializeEntityID.

public Transform EntityIdToTransform(SerializeEntityID from)

Parameters

from SerializeEntityID

Returns

Transform

GetCoherenceSyncForEntity(SerializeEntityID)

Get a CoherenceSync from the mapper.

public ICoherenceSync GetCoherenceSyncForEntity(SerializeEntityID id)

Parameters

id SerializeEntityID

A valid SerializeEntityID (meaning it exists in the mapper)

Returns

ICoherenceSync

GetEnumerator()

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

Returns

Dictionary<SerializeEntityID, NetworkEntityState>.Enumerator

GetNetworkEntityStateForEntity(SerializeEntityID)

Get a Network Entity State from the mapper.

public NetworkEntityState GetNetworkEntityStateForEntity(SerializeEntityID id)

Parameters

id SerializeEntityID

A valid SerializeEntityID (meaning it exists in the mapper)

Returns

NetworkEntityState

InterpolateBindings(InterpolationLoop)

public void InterpolateBindings(CoherenceSync.InterpolationLoop interpolationLoop)

Parameters

interpolationLoop CoherenceSync.InterpolationLoop

InvokeCallbacks()

public void InvokeCallbacks()

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(SerializeEntityID, out NetworkEntityState)

public bool TryGetNetworkEntityState(SerializeEntityID id, out NetworkEntityState networkEntityState)

Parameters

id SerializeEntityID
networkEntityState NetworkEntityState

Returns

bool

UnityObjectToEntityId(CoherenceSync)

Get the Coherence.Entity.SerializeEntityID for a CoherenceSync.

public SerializeEntityID UnityObjectToEntityId(CoherenceSync from)

Parameters

from CoherenceSync

Returns

SerializeEntityID

UnityObjectToEntityId(GameObject)

Get the Coherence.Entity.SerializeEntityID for a GameObject with CoherenceSync.

public SerializeEntityID UnityObjectToEntityId(GameObject from)

Parameters

from GameObject

Returns

SerializeEntityID

UnityObjectToEntityId(Transform)

Get the Coherence.Entity.SerializeEntityID for a Transform with CoherenceSync.

public SerializeEntityID UnityObjectToEntityId(Transform from)

Parameters

from Transform

Returns

SerializeEntityID