// tracks SyncVar read/write access when processing NetworkBehaviour, // to later be replaced by SyncVarAccessReplacer. using System.Collections.Generic; using Mono.Cecil; namespace Mirror.Weaver { // This data is flushed each time - if we are run multiple times in the same process/domain public class SyncVarAccessLists { // setter functions that replace [SyncVar] member variable references. dict public Dictionary replacementSetterProperties = new Dictionary(); // getter functions that replace [SyncVar] member variable references. dict public Dictionary replacementGetterProperties = new Dictionary(); // amount of SyncVars per class. dict // necessary for SyncVar dirty bits, where inheriting classes start // their dirty bits at base class SyncVar amount. public Dictionary numSyncVars = new Dictionary(); public int GetSyncVarStart(string className) => numSyncVars.TryGetValue(className, out int value) ? value : 0; public void SetNumSyncVars(string className, int num) { numSyncVars[className] = num; } } }