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
clientIClientbridgeCoherenceBridgeclientConnectionsManagerCoherenceClientConnectionManagerinputManagerCoherenceInputManageruniquenessManagerUniquenessManagerdefinitionIComponentInfologgerLogger
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
NetworkEntities
public IEnumerable<NetworkEntityState> NetworkEntities { get; }
Property Value
Methods
EntityIdToCoherenceSync(Entity)
Get the CoherenceSync for a Coherence.Entities.Entity.
public ICoherenceSync EntityIdToCoherenceSync(Entity from)
Parameters
fromEntity
Returns
EntityIdToGameObject(Entity)
Get the GameObject for a Coherence.Entities.Entity.
public GameObject EntityIdToGameObject(Entity from)
Parameters
fromEntity
Returns
- GameObject
EntityIdToRectTransform(Entity)
Get the RectTransform for a Coherence.Entities.Entity.
public RectTransform EntityIdToRectTransform(Entity from)
Parameters
fromEntity
Returns
EntityIdToTransform(Entity)
Get the Transform for a Coherence.Entities.Entity.
public Transform EntityIdToTransform(Entity from)
Parameters
fromEntity
Returns
GetCoherenceSyncForEntity(Entity)
Get a CoherenceSync from the mapper.
public ICoherenceSync GetCoherenceSyncForEntity(Entity id)
Parameters
idEntityA valid Entity (meaning it exists in the mapper)
Returns
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
idEntityA valid Entity (meaning it exists in the mapper)
Returns
InterpolateBindings(InterpolationLoop)
public void InterpolateBindings(CoherenceSync.InterpolationLoop interpolationLoop)
Parameters
interpolationLoopCoherenceSync.InterpolationLoop
InvokeCallbacks(InterpolationLoop)
public void InvokeCallbacks(CoherenceSync.InterpolationLoop interpolationLoop)
Parameters
interpolationLoopCoherenceSync.InterpolationLoop
SampleBindings(InterpolationLoop)
public void SampleBindings(CoherenceSync.InterpolationLoop interpolationLoop)
Parameters
interpolationLoopCoherenceSync.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(Entity, out NetworkEntityState)
public bool TryGetNetworkEntityState(Entity id, out NetworkEntityState networkEntityState)
Parameters
idEntitynetworkEntityStateNetworkEntityState
Returns
UnityObjectToEntityId(CoherenceSync)
Get the Coherence.Entities.Entity for a CoherenceSync.
public Entity UnityObjectToEntityId(CoherenceSync from)
Parameters
fromCoherenceSync
Returns
- Entity
UnityObjectToEntityId(GameObject)
Get the Coherence.Entities.Entity for a
GameObject with CoherenceSync.
public Entity UnityObjectToEntityId(GameObject from)
Parameters
fromGameObject
Returns
- Entity
UnityObjectToEntityId(Transform)
Get the Coherence.Entities.Entity for a
Transform with CoherenceSync.
public Entity UnityObjectToEntityId(Transform from)
Parameters
fromTransform
Returns
- Entity