Пример #1
0
        private void SystemDebug_Awake(ILContext il)
        {
            Collection <Instruction> instructions = il.Body.Instructions;

            il.IL.InsertBefore(instructions[0], il.IL.Create(OpCodes.Call, APIHelpers.FindMethod("SystemDebug", "OnDebuggingEnabled"))); //this.OnDebuggingEnabled();
            il.IL.InsertBefore(instructions[0], il.IL.Create(OpCodes.Ldarg_0));                                                          //idk why this needs to happen but it do
        }