CoherenceClientConnection
This class is a base of a connection entity, used to mark client presence and to send messages between clients.
Remarks
To use the connection system: Create a CoherenceSync prefab. Assign the prefab on ClientConnectionEntry or SimulatorConnectionEntry. Optionally, use ClientConnections's ProvidePrefab event for fine-grained control over entities instantiated for each connection. Make sure that EnableClientConnections is enabled.
The prefab will be instantiated for every new client connection. Since connection entities use a global CoherenceLiveQuery, they will be visible regardless of query filtering.
Properties
ClientId | Unique ID that identifies the client, assigned by the replication server. |
CoherenceBridge | CoherenceBridge associated with the client connection. |
EntityId | Client connection entity. |
GameObject | UnityEngine.GameObject associated with the client connection. |
IsMyConnection | true if this CoherenceClientConnection belongs to the local client. |
NetworkEntity | Entity state associated with the client connection. |
Sync | CoherenceSync associated with the client connection. |
Type | Connection type against the replication server. |
Methods
SendClientMessage | Sends a client message to the connection whose ClientId matches the |