Table of Contents

Class NetworkEntityState

Namespace
Coherence.Toolkit
Assembly
Coherence.Toolkit.dll
public class NetworkEntityState
Inheritance
NetworkEntityState

Constructors

NetworkEntityState(SerializeEntityID, AuthorityType, bool, bool, ICoherenceSync, string)

public NetworkEntityState(SerializeEntityID entityId, AuthorityType authority, bool isOrphaned, bool networkInstantiated, ICoherenceSync sync, string uuid)

Parameters

entityId SerializeEntityID
authority AuthorityType
isOrphaned bool
networkInstantiated bool
sync ICoherenceSync
uuid string

Fields

ClientConnection

Instance for a Client Connection, in the case this EntityState represents a Client Connection.

public CoherenceClientConnection ClientConnection

Field Value

CoherenceClientConnection

Properties

AuthorityType

public ObservableAuthorityType AuthorityType { get; }

Property Value

ObservableAuthorityType

CoherenceUUID

A unique identifier used to ensure that CoherenceSync objects with set to only have a single instance across all clients.

public string CoherenceUUID { get; }

Property Value

string

EntityID

A local id used to identify the entity on the current client. This id is not synced across clients.

If you need to sync or send an entity reference to another client, use a coherence 'entity reference' instead (this can be a CoherenceSync, GameObject or a UnityEngine.Transform.)

public SerializeEntityID EntityID { get; }

Property Value

SerializeEntityID

HasInputAuthority

True if your client has input authority over the entity. Input authority can produce inputs via CoherenceInput which are then sent to the state authority who processes them.

public bool HasInputAuthority { get; }

Property Value

bool

HasStateAuthority

True if your client has state authority over the entity. State authority is an actual owner of the entity and controls all the synced variables.

public bool HasStateAuthority { get; }

Property Value

bool

IsMyClientConnection

True if the entity is the prefab sync created by the client connection for this client.

public bool IsMyClientConnection { get; }

Property Value

bool

IsOrphaned

True if no client has authority over the entity.

public bool IsOrphaned { get; }

Property Value

bool

LastTimeRequestedOrphanAdoption

public float LastTimeRequestedOrphanAdoption { get; }

Property Value

float

NetworkInstantiated

True, if the object was originally created from network replication. False, if the object was instantiated locally.

public bool NetworkInstantiated { get; }

Property Value

bool

Sync

public ICoherenceSync Sync { get; }

Property Value

ICoherenceSync