Class SyncMethodAttribute
An attribute that is used to mark methods for syncing.
Namespace: UnofficialMultiplayerAPI
Assembly: 0UnofficialMultiplayerAPI.dll
Syntax
[AttributeUsage(AttributeTargets.Method)]
public class SyncMethodAttribute : Attribute, _Attribute
Examples
An example showing how to mark a method for syncing.
[SyncMethod]
public void MyMethod(...)
{
...
}
Constructors
SyncMethodAttribute(SyncContext)
Declaration
public SyncMethodAttribute(SyncContext context = SyncContext.None)
Parameters
| Type | Name | Description |
|---|---|---|
| SyncContext | context | Context |
Fields
cancelIfAnyArgNull
Instructs SyncMethod to cancel synchronization if any arg is null (see CancelIfAnyArgNull()).
Declaration
public bool cancelIfAnyArgNull
Field Value
| Type | Description |
|---|---|
| Boolean |
cancelIfNoSelectedMapObjects
Instructs SyncMethod to cancel synchronization if no map objects were selected during the call (see CancelIfNoSelectedMapObjects()).
Declaration
public bool cancelIfNoSelectedMapObjects
Field Value
| Type | Description |
|---|---|
| Boolean |
cancelIfNoSelectedWorldObjects
Instructs SyncMethod to cancel synchronization if no world objects were selected during call replication(see CancelIfNoSelectedWorldObjects()).
Declaration
public bool cancelIfNoSelectedWorldObjects
Field Value
| Type | Description |
|---|---|
| Boolean |
context
Declaration
public SyncContext context
Field Value
| Type | Description |
|---|---|
| SyncContext |
exposeParameters
A list of types to expose (see ExposeParameter(Int32))
Declaration
public int[] exposeParameters
Field Value
| Type | Description |
|---|---|
| Int32[] |
setDebugOnly
Instructs SyncMethod to synchronize only in debug mode (see SetDebugOnly()).
Declaration
public bool setDebugOnly
Field Value
| Type | Description |
|---|---|
| Boolean |