public void AddLocals() { DirtyLocal = Method.AddLocal <bool>(); DirtyBitsLocal = Method.AddLocal <ulong>(); // store dirty bit in local variable to avoid calling property multiple times worker.Append(worker.Create(OpCodes.Ldarg_0)); worker.Append(worker.Create(OpCodes.Call, (NetworkBehaviour nb) => nb.SyncVarDirtyBits)); worker.Append(worker.Create(OpCodes.Stloc, DirtyBitsLocal)); }
public void AddLocals() { DirtyBitsLocal = Method.AddLocal <ulong>(); }