• API Documentation

    Show / Hide Table of Contents
    • UnofficialMultiplayerAPI
      • IMultiplayerInit
      • ISyncable
      • ISyncField
      • ISyncMethod
      • MPApi
      • SyncContext
      • SyncerAttribute
      • SyncMethodAttribute
      • SyncWorker
      • UninitializedAPI

    Interface ISyncMethod

    SyncMethod interface.

    Namespace: UnofficialMultiplayerAPI
    Assembly: 0UnofficialMultiplayerAPI.dll
    Syntax
    public interface ISyncMethod
    Remarks

    See SyncMethodAttribute, RegisterSyncMethod(MethodInfo, SyncType[]) and RegisterSyncMethod(Type, String, SyncType[]) to see how to use it.

    Methods

    CancelIfAnyArgNull()

    Instructs SyncMethod to cancel synchronization if any arg is null.

    Declaration
    ISyncMethod CancelIfAnyArgNull()
    Returns
    Type Description
    ISyncMethod

    self

    CancelIfNoSelectedMapObjects()

    Instructs SyncMethod to cancel synchronization if no map objects were selected during call replication.

    Declaration
    ISyncMethod CancelIfNoSelectedMapObjects()
    Returns
    Type Description
    ISyncMethod

    self

    CancelIfNoSelectedWorldObjects()

    Instructs SyncMethod to cancel synchronization if no world objects were selected during call replication.

    Declaration
    ISyncMethod CancelIfNoSelectedWorldObjects()
    Returns
    Type Description
    ISyncMethod

    self

    ExposeParameter(Int32)

    Use parameter's type's IExposable interface to transfer its data to other clients.

    Declaration
    ISyncMethod ExposeParameter(int index)
    Parameters
    Type Name Description
    Int32 index

    Index at which parameter is to be marked to expose

    Returns
    Type Description
    ISyncMethod

    self

    Remarks

    IExposable is the interface used for saving data to the save which means it utilizes IExposable.ExposeData() method.

    MinTime(Int32)

    Currently unused in the Multiplayer mod.

    Declaration
    ISyncMethod MinTime(int time)
    Parameters
    Type Name Description
    Int32 time

    Milliseconds between resends

    Returns
    Type Description
    ISyncMethod

    self

    SetContext(SyncContext)

    Instructs method to send context along with the call.

    Declaration
    ISyncMethod SetContext(SyncContext context)
    Parameters
    Type Name Description
    SyncContext context

    One or more context flags

    Returns
    Type Description
    ISyncMethod

    self

    Remarks

    Context is restored after method is called.

    SetDebugOnly()

    Instructs SyncMethod to synchronize only in debug mode.

    Declaration
    ISyncMethod SetDebugOnly()
    Returns
    Type Description
    ISyncMethod

    self

    SetPreInvoke(Action<Object, Object[]>)

    Adds an Action that runs before a call is replicated on client.

    Declaration
    ISyncMethod SetPreInvoke(Action<object, object[]> action)
    Parameters
    Type Name Description
    Action<Object, Object[]> action

    An action ran before a call is replicated on client. Called with target and value.

    Returns
    Type Description
    ISyncMethod

    self

    SetVersion(Int32)

    Declaration
    ISyncMethod SetVersion(int version)
    Parameters
    Type Name Description
    Int32 version

    Handler version

    Returns
    Type Description
    ISyncMethod

    self

    Back to top Generated by DocFX