Struct RPCRegistrator
Namespace: LiteEntitySystem
Assembly: LiteEntitySystem.dll
Syntax
public readonly ref struct RPCRegistrator
Methods
BindOnChange<T, TEntity>(TEntity, ref SyncVar<T>, Action<T>)
Bind notification of SyncVar changes to action (OnSync will be called after RPCs and OnConstructs)
Declaration
public void BindOnChange<T, TEntity>(TEntity self, ref SyncVar<T> syncVar, Action<T> onChangedAction) where T : unmanaged where TEntity : InternalEntity
Parameters
Type | Name | Description |
---|---|---|
TEntity | self | Target entity for binding |
SyncVar<T> | syncVar | Variable to bind |
Action<T> | onChangedAction | Action that will be called when variable changes by sync |
Type Parameters
Name | Description |
---|---|
T | |
TEntity |
BindOnChange<T, TEntity>(TEntity, ref SyncVar<T>, Action<T>, OnSyncExecutionOrder)
Bind notification of SyncVar changes to action
Declaration
public void BindOnChange<T, TEntity>(TEntity self, ref SyncVar<T> syncVar, Action<T> onChangedAction, OnSyncExecutionOrder executionOrder) where T : unmanaged where TEntity : InternalEntity
Parameters
Type | Name | Description |
---|---|---|
TEntity | self | Target entity for binding |
SyncVar<T> | syncVar | Variable to bind |
Action<T> | onChangedAction | Action that will be called when variable changes by sync |
OnSyncExecutionOrder | executionOrder | order of execution |
Type Parameters
Name | Description |
---|---|
T | |
TEntity |
CreateRPCAction<TEntity>(Action<TEntity>, ref RemoteCall, ExecuteFlags)
Creates cached rpc action
Declaration
public void CreateRPCAction<TEntity>(Action<TEntity> methodToCall, ref RemoteCall remoteCallHandle, ExecuteFlags flags) where TEntity : InternalEntity
Parameters
Type | Name | Description |
---|---|---|
Action<TEntity> | methodToCall | RPC method to call |
RemoteCall | remoteCallHandle | output handle that should be used to call rpc |
ExecuteFlags | flags | RPC execution flags |
Type Parameters
Name | Description |
---|---|
TEntity |
CreateRPCAction<TEntity>(TEntity, Action, ref RemoteCall, ExecuteFlags)
Creates cached rpc action
Declaration
public void CreateRPCAction<TEntity>(TEntity self, Action methodToCall, ref RemoteCall remoteCallHandle, ExecuteFlags flags) where TEntity : InternalEntity
Parameters
Type | Name | Description |
---|---|---|
TEntity | self | Target entity with RPC |
Action | methodToCall | RPC method to call |
RemoteCall | remoteCallHandle | output handle that should be used to call rpc |
ExecuteFlags | flags | RPC execution flags |
Type Parameters
Name | Description |
---|---|
TEntity |
CreateRPCAction<TEntity, T>(SpanAction<TEntity, T>, ref RemoteCallSpan<T>, ExecuteFlags)
Creates cached rpc action with Span argument
Declaration
public void CreateRPCAction<TEntity, T>(SpanAction<TEntity, T> methodToCall, ref RemoteCallSpan<T> remoteCallHandle, ExecuteFlags flags) where TEntity : InternalEntity where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
SpanAction<TEntity, T> | methodToCall | RPC method to call |
RemoteCallSpan<T> | remoteCallHandle | output handle that should be used to call rpc |
ExecuteFlags | flags | RPC execution flags |
Type Parameters
Name | Description |
---|---|
TEntity | |
T |
CreateRPCAction<TEntity, T>(Action<TEntity, T>, ref RemoteCallSerializable<T>, ExecuteFlags)
Creates cached rpc action with ISpanSerializable argument
Declaration
public void CreateRPCAction<TEntity, T>(Action<TEntity, T> methodToCall, ref RemoteCallSerializable<T> remoteCallHandle, ExecuteFlags flags) where TEntity : InternalEntity where T : struct, ISpanSerializable
Parameters
Type | Name | Description |
---|---|---|
Action<TEntity, T> | methodToCall | RPC method to call |
RemoteCallSerializable<T> | remoteCallHandle | output handle that should be used to call rpc |
ExecuteFlags | flags | RPC execution flags |
Type Parameters
Name | Description |
---|---|
TEntity | |
T |
CreateRPCAction<TEntity, T>(Action<TEntity, T>, ref RemoteCall<T>, ExecuteFlags)
Creates cached rpc action with valueType argument
Declaration
public void CreateRPCAction<TEntity, T>(Action<TEntity, T> methodToCall, ref RemoteCall<T> remoteCallHandle, ExecuteFlags flags) where TEntity : InternalEntity where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
Action<TEntity, T> | methodToCall | RPC method to call |
RemoteCall<T> | remoteCallHandle | output handle that should be used to call rpc |
ExecuteFlags | flags | RPC execution flags |
Type Parameters
Name | Description |
---|---|
TEntity | |
T |
CreateRPCAction<TEntity, T>(TEntity, SpanAction<T>, ref RemoteCallSpan<T>, ExecuteFlags)
Creates cached rpc action with Span argument
Declaration
public void CreateRPCAction<TEntity, T>(TEntity self, SpanAction<T> methodToCall, ref RemoteCallSpan<T> remoteCallHandle, ExecuteFlags flags) where TEntity : InternalEntity where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
TEntity | self | Target entity with RPC |
SpanAction<T> | methodToCall | RPC method to call |
RemoteCallSpan<T> | remoteCallHandle | output handle that should be used to call rpc |
ExecuteFlags | flags | RPC execution flags |
Type Parameters
Name | Description |
---|---|
TEntity | |
T |
CreateRPCAction<TEntity, T>(TEntity, Action<T>, ref RemoteCallSerializable<T>, ExecuteFlags)
Creates cached rpc action with ISpanSerializable argument
Declaration
public void CreateRPCAction<TEntity, T>(TEntity self, Action<T> methodToCall, ref RemoteCallSerializable<T> remoteCallHandle, ExecuteFlags flags) where TEntity : InternalEntity where T : struct, ISpanSerializable
Parameters
Type | Name | Description |
---|---|---|
TEntity | self | Target entity with RPC |
Action<T> | methodToCall | RPC method to call |
RemoteCallSerializable<T> | remoteCallHandle | output handle that should be used to call rpc |
ExecuteFlags | flags | RPC execution flags |
Type Parameters
Name | Description |
---|---|
TEntity | |
T |
CreateRPCAction<TEntity, T>(TEntity, Action<T>, ref RemoteCall<T>, ExecuteFlags)
Creates cached rpc action with valueType argument
Declaration
public void CreateRPCAction<TEntity, T>(TEntity self, Action<T> methodToCall, ref RemoteCall<T> remoteCallHandle, ExecuteFlags flags) where TEntity : InternalEntity where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
TEntity | self | Target entity with RPC |
Action<T> | methodToCall | RPC method to call |
RemoteCall<T> | remoteCallHandle | output handle that should be used to call rpc |
ExecuteFlags | flags | RPC execution flags |
Type Parameters
Name | Description |
---|---|
TEntity | |
T |