Skip to content

Mirror::Weaver::SyncVarProcessor

Processes [SyncVar] in NetworkBehaviour

Public Functions

Name
MethodDefinition GetHookMethod(TypeDefinition td, FieldDefinition syncVar)
MethodDefinition GenerateSyncVarGetter(FieldDefinition fd, string originalName, FieldDefinition netFieldId)
MethodDefinition GenerateSyncVarSetter(TypeDefinition td, FieldDefinition fd, string originalName, long dirtyBit, FieldDefinition netFieldId)
void ProcessSyncVar(TypeDefinition td, FieldDefinition fd, Dictionary< FieldDefinition, FieldDefinition > syncVarNetIds, long dirtyBit)
void WriteCallHookMethodUsingArgument(ILProcessor worker, MethodDefinition hookMethod, VariableDefinition oldValue)
void WriteCallHookMethodUsingField(ILProcessor worker, MethodDefinition hookMethod, VariableDefinition oldValue, FieldDefinition newValue)

Public Attributes

Name
List< FieldDefinition > syncVars

Public Functions Documentation

function GetHookMethod

static inline MethodDefinition GetHookMethod(
    TypeDefinition td,
    FieldDefinition syncVar
)

function GenerateSyncVarGetter

static inline MethodDefinition GenerateSyncVarGetter(
    FieldDefinition fd,
    string originalName,
    FieldDefinition netFieldId
)

function GenerateSyncVarSetter

static inline MethodDefinition GenerateSyncVarSetter(
    TypeDefinition td,
    FieldDefinition fd,
    string originalName,
    long dirtyBit,
    FieldDefinition netFieldId
)

function ProcessSyncVar

static inline void ProcessSyncVar(
    TypeDefinition td,
    FieldDefinition fd,
    Dictionary< FieldDefinition, FieldDefinition > syncVarNetIds,
    long dirtyBit
)

function WriteCallHookMethodUsingArgument

static inline void WriteCallHookMethodUsingArgument(
    ILProcessor worker,
    MethodDefinition hookMethod,
    VariableDefinition oldValue
)

function WriteCallHookMethodUsingField

static inline void WriteCallHookMethodUsingField(
    ILProcessor worker,
    MethodDefinition hookMethod,
    VariableDefinition oldValue,
    FieldDefinition newValue
)

Public Attributes Documentation

variable syncVars

static List< FieldDefinition > syncVars;

Updated on 25 January 2021 at 09:57:20 UTC