Class EntitiesManager
public sealed class EntitiesManager
- Inheritance
-
EntitiesManager
Constructors
EntitiesManager(IClient, CoherenceBridge, CoherenceClientConnectionManager, CoherenceInputManager, UniquenessManager, IComponentInfo, Logger)
public EntitiesManager(IClient client, CoherenceBridge bridge, CoherenceClientConnectionManager clientConnectionsManager, CoherenceInputManager inputManager, UniquenessManager uniquenessManager, IComponentInfo definition, Logger logger)
Parameters
client
IClientbridge
CoherenceBridgeclientConnectionsManager
CoherenceClientConnectionManagerinputManager
CoherenceInputManageruniquenessManager
UniquenessManagerdefinition
IComponentInfologger
Logger
Properties
ConnectionEntityID
public SerializeEntityID ConnectionEntityID { get; }
Property Value
- SerializeEntityID
EntityCount
public int EntityCount { get; }
Property Value
NetworkEntities
public IEnumerable<NetworkEntityState> NetworkEntities { get; }
Property Value
Methods
EntityIdToCoherenceSync(SerializeEntityID)
Get the CoherenceSync for a Coherence.Entity.SerializeEntityID.
public ICoherenceSync EntityIdToCoherenceSync(SerializeEntityID from)
Parameters
from
SerializeEntityID
Returns
EntityIdToGameObject(SerializeEntityID)
Get the GameObject
for a Coherence.Entity.SerializeEntityID.
public GameObject EntityIdToGameObject(SerializeEntityID from)
Parameters
from
SerializeEntityID
Returns
EntityIdToRectTransform(SerializeEntityID)
Get the RectTransform
for a Coherence.Entity.SerializeEntityID.
public RectTransform EntityIdToRectTransform(SerializeEntityID from)
Parameters
from
SerializeEntityID
Returns
EntityIdToTransform(SerializeEntityID)
Get the Transform
for a Coherence.Entity.SerializeEntityID.
public Transform EntityIdToTransform(SerializeEntityID from)
Parameters
from
SerializeEntityID
Returns
GetCoherenceSyncForEntity(SerializeEntityID)
Get a CoherenceSync from the mapper.
public ICoherenceSync GetCoherenceSyncForEntity(SerializeEntityID id)
Parameters
id
SerializeEntityIDA valid SerializeEntityID (meaning it exists in the mapper)
Returns
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
SerializeEntityIDA valid SerializeEntityID (meaning it exists in the mapper)
Returns
InterpolateBindings(InterpolationLoop)
public void InterpolateBindings(CoherenceSync.InterpolationLoop interpolationLoop)
Parameters
interpolationLoop
CoherenceSync.InterpolationLoop
InvokeCallbacks(InterpolationLoop)
public void InvokeCallbacks(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
SyncAndSend()
public void SyncAndSend()
TryGetNetworkEntityState(SerializeEntityID, out NetworkEntityState)
public bool TryGetNetworkEntityState(SerializeEntityID id, out NetworkEntityState networkEntityState)
Parameters
id
SerializeEntityIDnetworkEntityState
NetworkEntityState
Returns
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