static StackObject *Add_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 7);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 writeMask = ptr_of_this_method->Value;
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 readMask = ptr_of_this_method->Value;
            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Rendering.ColorWriteMask colorWriteMask = (UnityEngine.Rendering.ColorWriteMask) typeof(UnityEngine.Rendering.ColorWriteMask).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            UnityEngine.Rendering.CompareFunction compareFunction = (UnityEngine.Rendering.CompareFunction) typeof(UnityEngine.Rendering.CompareFunction).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 5);
            UnityEngine.Rendering.StencilOp operation = (UnityEngine.Rendering.StencilOp) typeof(UnityEngine.Rendering.StencilOp).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 6);
            System.Int32 stencilID = ptr_of_this_method->Value;
            ptr_of_this_method = ILIntepreter.Minus(__esp, 7);
            UnityEngine.Material baseMat = (UnityEngine.Material) typeof(UnityEngine.Material).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = UnityEngine.UI.StencilMaterial.Add(baseMat, stencilID, operation, compareFunction, colorWriteMask, readMask, writeMask);

            object obj_result_of_this_method = result_of_this_method;

            if (obj_result_of_this_method is CrossBindingAdaptorType)
            {
                return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance));
            }
            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
Example #2
0
    private void StencilSettings(MaterialEditor materialEditor, MaterialProperty[] properties)
    {
        EditorGUILayout.Separator();
        GUILayout.Label("Stencil Settings", bigLabel);
        materialEditor.ShaderProperty(properties[149], properties[149].displayName);

        MaterialProperty stencilOpMP = ShaderGUI.FindProperty("_StencilOp", properties);

        UnityEngine.Rendering.StencilOp stencilOp = (UnityEngine.Rendering.StencilOp)stencilOpMP.floatValue;
        stencilOp = (UnityEngine.Rendering.StencilOp)stencilOpMP.floatValue;
        stencilOp = (UnityEngine.Rendering.StencilOp)EditorGUILayout.EnumPopup("StencilOp", stencilOp);
        stencilOpMP.floatValue = (float)(stencilOp);

        MaterialProperty stencilCompMP = ShaderGUI.FindProperty("_StencilComp", properties);

        stencilComp = (UnityEngine.Rendering.CompareFunction)stencilCompMP.floatValue;
        stencilComp = (UnityEngine.Rendering.CompareFunction)EditorGUILayout.EnumPopup("StencilComp", stencilComp);
        stencilCompMP.floatValue = (float)(stencilComp);
    }