Table of Contents

Class CoherenceCore

Namespace
Coherence.Core
Assembly
Coherence.Core.Native.dll
public class CoherenceCore
Inheritance
CoherenceCore

Constructors

CoherenceCore(IDefinition, IComponentInteropHandler, string, Action<int, string>)

public CoherenceCore(IDefinition definition, IComponentInteropHandler interopHandler, string schemaText, Action<int, string> onLog)

Parameters

definition IDefinition
interopHandler IComponentInteropHandler
schemaText string
onLog Action<int, string>

Fields

DebugOnEntityAcked

public Action<InteropEntity>? DebugOnEntityAcked

Field Value

Action<InteropEntity>

DebugOnPacketReceived

public Action<int>? DebugOnPacketReceived

Field Value

Action<int>

OnAuthorityChanged

public Action<InteropAuthorityChange>? OnAuthorityChanged

Field Value

Action<InteropAuthorityChange>

OnAuthorityRequestRejected

public Action<InteropAuthorityChange>? OnAuthorityRequestRejected

Field Value

Action<InteropAuthorityChange>

OnAuthorityRequested

public Action<InteropAuthorityRequest>? OnAuthorityRequested

Field Value

Action<InteropAuthorityRequest>

OnAuthorityTransferred

public Action<InteropEntity>? OnAuthorityTransferred

Field Value

Action<InteropEntity>

OnCommand

public Action<IEntityCommand, MessageTarget, InteropEntity>? OnCommand

Field Value

Action<IEntityCommand, MessageTarget, InteropEntity>

OnConnected

public Action<InteropClientID, InteropEndpointData>? OnConnected

Field Value

Action<InteropClientID, InteropEndpointData>

OnConnectionError

public Action<string>? OnConnectionError

Field Value

Action<string>

OnDisconnected

public Action<ConnectionCloseReason>? OnDisconnected

Field Value

Action<ConnectionCloseReason>

OnEntityCreated

public Action<InteropEntityWithMeta, ICoherenceComponentData[], InteropVector3f>? OnEntityCreated

Field Value

Action<InteropEntityWithMeta, ICoherenceComponentData[], InteropVector3f>

OnEntityDestroyed

public Action<InteropEntity, DestroyReason>? OnEntityDestroyed

Field Value

Action<InteropEntity, DestroyReason>

OnEntityUpdated

public Action<InteropEntityWithMeta, ICoherenceComponentData[], uint[], InteropVector3f>? OnEntityUpdated

Field Value

Action<InteropEntityWithMeta, ICoherenceComponentData[], uint[], InteropVector3f>

OnInput

public Action<IEntityInput, long, InteropEntity>? OnInput

Field Value

Action<IEntityInput, long, InteropEntity>

OnSceneIndexChanged

public Action<InteropSceneIndexChange>? OnSceneIndexChanged

Field Value

Action<InteropSceneIndexChange>

Properties

ClientID

public InteropClientID ClientID { get; }

Property Value

InteropClientID

ConnectionSettings

public InteropConnectionSettings ConnectionSettings { get; }

Property Value

InteropConnectionSettings

ConnectionState

public ConnectionState ConnectionState { get; }

Property Value

ConnectionState

ConnectionType

public ConnectionType ConnectionType { get; }

Property Value

ConnectionType

HostName

public string HostName { get; }

Property Value

string

InitialScene

public uint InitialScene { get; set; }

Property Value

uint

LastEndpointData

public InteropEndpointData LastEndpointData { get; }

Property Value

InteropEndpointData

SendFrequency

public byte SendFrequency { get; }

Property Value

byte

Methods

CanSendUpdates(InteropEntity)

public bool CanSendUpdates(InteropEntity entity)

Parameters

entity InteropEntity

Returns

bool

Connect(InteropEndpointData, InteropConnectionSettings, ConnectionType)

public void Connect(InteropEndpointData data, InteropConnectionSettings settings, ConnectionType typ)

Parameters

data InteropEndpointData
settings InteropConnectionSettings
typ ConnectionType

CreateEntity(ICoherenceComponentData[], bool)

public InteropEntity CreateEntity(ICoherenceComponentData[] components, bool orphan)

Parameters

components ICoherenceComponentData[]
orphan bool

Returns

InteropEntity

DebugDropNextOutPacket(Action)

public void DebugDropNextOutPacket(Action callback)

Parameters

callback Action

DebugEcho(string)

public void DebugEcho(string msg)

Parameters

msg string

DebugHoldAllPackets(bool)

public void DebugHoldAllPackets(bool hold)

Parameters

hold bool

DebugInteropCallbacks(string)

public void DebugInteropCallbacks(string cbName)

Parameters

cbName string

DebugInteropCreateEntityCallback(InteropEntity, ComponentDataContainer[])

public void DebugInteropCreateEntityCallback(InteropEntity entity, ComponentDataContainer[] data)

Parameters

entity InteropEntity
data ComponentDataContainer[]

DebugInteropSetters(ConnectionType, string, InteropEndpointData, InteropConnectionSettings)

public void DebugInteropSetters(ConnectionType connectionType, string hostname, InteropEndpointData endpoint, InteropConnectionSettings connectionSettings)

Parameters

connectionType ConnectionType
hostname string
endpoint InteropEndpointData
connectionSettings InteropConnectionSettings

DebugOnNextPacketSentOneShot(Action)

public void DebugOnNextPacketSentOneShot(Action callback)

Parameters

callback Action

DebugReleaseAllHeldPackets()

public void DebugReleaseAllHeldPackets()

DebugSetNetworkCondition(InteropNetworkConditions)

public void DebugSetNetworkCondition(InteropNetworkConditions condition)

Parameters

condition InteropNetworkConditions

DebugStopSerializingUpdates(bool)

public void DebugStopSerializingUpdates(bool stop)

Parameters

stop bool

DestroyEntity(InteropEntity)

public void DestroyEntity(InteropEntity entity)

Parameters

entity InteropEntity

Disconnect()

public void Disconnect()

Dispose()

public void Dispose()

EntityExists(InteropEntity)

public bool EntityExists(InteropEntity entity)

Parameters

entity InteropEntity

Returns

bool

GetFloatingOrigin()

public InteropVector3d GetFloatingOrigin()

Returns

InteropVector3d

GetNetworkTime()

public double GetNetworkTime()

Returns

double

GetNetworkTimeAccountForPing()

public bool GetNetworkTimeAccountForPing()

Returns

bool

GetNetworkTimeClientFixedSimulationFrame()

public InteropAbsoluteSimulationFrame GetNetworkTimeClientFixedSimulationFrame()

Returns

InteropAbsoluteSimulationFrame

GetNetworkTimeClientSimulationFrame()

public InteropAbsoluteSimulationFrame GetNetworkTimeClientSimulationFrame()

Returns

InteropAbsoluteSimulationFrame

GetNetworkTimeConnectionSimulationFrame()

public InteropAbsoluteSimulationFrame GetNetworkTimeConnectionSimulationFrame()

Returns

InteropAbsoluteSimulationFrame

GetNetworkTimeFixedTimeStep()

public double GetNetworkTimeFixedTimeStep()

Returns

double

GetNetworkTimeMultiClientMode()

public bool GetNetworkTimeMultiClientMode()

Returns

bool

GetNetworkTimePause()

public bool GetNetworkTimePause()

Returns

bool

GetNetworkTimeScale()

public double GetNetworkTimeScale()

Returns

double

GetNetworkTimeServerSimulationFrame()

public InteropAbsoluteSimulationFrame GetNetworkTimeServerSimulationFrame()

Returns

InteropAbsoluteSimulationFrame

GetNetworkTimeSmoothTimeScaleChange()

public bool GetNetworkTimeSmoothTimeScaleChange()

Returns

bool

GetPing()

public InteropPing GetPing()

Returns

InteropPing

GetSessionTime()

public double GetSessionTime()

Returns

double

GetTargetNetworkTimeScale()

public double GetTargetNetworkTimeScale()

Returns

double

HasAuthorityOverEntity(InteropEntity, AuthorityType)

public bool HasAuthorityOverEntity(InteropEntity entity, AuthorityType authorityType)

Parameters

entity InteropEntity
authorityType AuthorityType

Returns

bool

IsConnected()

public bool IsConnected()

Returns

bool

IsConnecting()

public bool IsConnecting()

Returns

bool

IsDisconnected()

public bool IsDisconnected()

Returns

bool

IsEntityInAuthTransfer(InteropEntity)

public bool IsEntityInAuthTransfer(InteropEntity entity)

Parameters

entity InteropEntity

Returns

bool

IsNetworkTimeSynced()

public bool IsNetworkTimeSynced()

Returns

bool

Receive()

public void Receive()

Reconnect()

public void Reconnect()

RemoveComponents(InteropEntity, uint[])

public void RemoveComponents(InteropEntity entity, uint[] componentId)

Parameters

entity InteropEntity
componentId uint[]

ResetNetworkTime(InteropAbsoluteSimulationFrame, bool)

public void ResetNetworkTime(InteropAbsoluteSimulationFrame newClientAndServerSimFrame, bool notify)

Parameters

newClientAndServerSimFrame InteropAbsoluteSimulationFrame
notify bool

Send()

public void Send()

SendAdoptOrphanRequest(InteropEntity)

public void SendAdoptOrphanRequest(InteropEntity entity)

Parameters

entity InteropEntity

SendAuthorityRequest(InteropEntity, AuthorityType)

public void SendAuthorityRequest(InteropEntity entity, AuthorityType authorityType)

Parameters

entity InteropEntity
authorityType AuthorityType

SendAuthorityTransfer(InteropEntity, InteropClientID, AuthorityType, bool)

public bool SendAuthorityTransfer(InteropEntity entity, InteropClientID clientID, AuthorityType authorityType, bool authorized)

Parameters

entity InteropEntity
clientID InteropClientID
authorityType AuthorityType
authorized bool

Returns

bool

SendCommand(IEntityCommand, MessageTarget, InteropEntity)

public bool SendCommand(IEntityCommand message, MessageTarget target, InteropEntity id)

Parameters

message IEntityCommand
target MessageTarget
id InteropEntity

Returns

bool

SendCommand<T>(InteropEntity, MessageTarget, uint, T, int)

public bool SendCommand<T>(InteropEntity id, MessageTarget target, uint commandType, T message, int dataSize) where T : unmanaged

Parameters

id InteropEntity
target MessageTarget
commandType uint
message T
dataSize int

Returns

bool

Type Parameters

T

SendInput(IEntityInput, InteropEntity)

public void SendInput(IEntityInput input, InteropEntity id)

Parameters

input IEntityInput
id InteropEntity

SendInput<T>(InteropEntity, long, uint, T, int)

public void SendInput<T>(InteropEntity id, long frame, uint inputType, T message, int dataSize) where T : unmanaged

Parameters

id InteropEntity
frame long
inputType uint
message T
dataSize int

Type Parameters

T

SetFloatingOrigin(InteropVector3d)

public void SetFloatingOrigin(InteropVector3d floatingOrigin)

Parameters

floatingOrigin InteropVector3d

SetLogLevel(LogLevel)

public void SetLogLevel(LogLevel level)

Parameters

level LogLevel

SetNetworkTimeAccountForPing(bool)

public void SetNetworkTimeAccountForPing(bool accountForPing)

Parameters

accountForPing bool

SetNetworkTimeFixedTimeStep(double)

public void SetNetworkTimeFixedTimeStep(double fixedTimeStep)

Parameters

fixedTimeStep double

SetNetworkTimeMultiClientMode(bool)

public void SetNetworkTimeMultiClientMode(bool multiClientMode)

Parameters

multiClientMode bool

SetNetworkTimePause(bool)

public void SetNetworkTimePause(bool pause)

Parameters

pause bool

SetNetworkTimeSmoothTimeScaleChange(bool)

public void SetNetworkTimeSmoothTimeScaleChange(bool smoothTimeScaleChange)

Parameters

smoothTimeScaleChange bool

SetTransportFactory(TransportFactoryConstruct, TransportFactoryDestruct)

public void SetTransportFactory(NativeTransport.TransportFactoryConstruct construct, NativeTransport.TransportFactoryDestruct destruct)

Parameters

construct NativeTransport.TransportFactoryConstruct
destruct NativeTransport.TransportFactoryDestruct

StepNetworkTime(double)

public void StepNetworkTime(double currentTime)

Parameters

currentTime double

UpdateComponent<T>(InteropEntity, uint, T, int, uint, uint, long[])

public void UpdateComponent<T>(InteropEntity entity, uint componentId, T component, int dataSize, uint fieldMask, uint stoppedMask, long[] frames) where T : unmanaged

Parameters

entity InteropEntity
componentId uint
component T
dataSize int
fieldMask uint
stoppedMask uint
frames long[]

Type Parameters

T

UpdateComponents(InteropEntity, ICoherenceComponentData[])

public void UpdateComponents(InteropEntity entity, ICoherenceComponentData[] components)

Parameters

entity InteropEntity
components ICoherenceComponentData[]

Events

DebugOnPacketSent

public event Action<PacketSentDebugInfo>? DebugOnPacketSent

Event Type

Action<PacketSentDebugInfo>