Ejemplo n.º 1
0
    static int GetModifiedMaterial(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        MaskableGraphic obj  = LuaScriptMgr.GetUnityObject <MaskableGraphic>(L, 1);
        Material        arg0 = LuaScriptMgr.GetUnityObject <Material>(L, 2);
        Material        o    = obj.GetModifiedMaterial(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Ejemplo n.º 2
0
    static int GetModifiedMaterial(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        MaskableGraphic obj  = (MaskableGraphic)LuaScriptMgr.GetUnityObjectSelf(L, 1, "MaskableGraphic");
        Material        arg0 = (Material)LuaScriptMgr.GetUnityObject(L, 2, typeof(Material));
        Material        o    = obj.GetModifiedMaterial(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
    private static int GetModifiedMaterial(IntPtr L)
    {
        int result;

        try
        {
            ToLua.CheckArgsCount(L, 2);
            MaskableGraphic maskableGraphic  = (MaskableGraphic)ToLua.CheckObject(L, 1, typeof(MaskableGraphic));
            Material        baseMaterial     = (Material)ToLua.CheckUnityObject(L, 2, typeof(Material));
            Material        modifiedMaterial = maskableGraphic.GetModifiedMaterial(baseMaterial);
            ToLua.Push(L, modifiedMaterial);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaDLL.toluaL_exception(L, e, null);
        }
        return(result);
    }
    public static int GetModifiedMaterial(IntPtr l)
    {
        int result;

        try
        {
            MaskableGraphic maskableGraphic = (MaskableGraphic)LuaObject.checkSelf(l);
            Material        baseMaterial;
            LuaObject.checkType <Material>(l, 2, out baseMaterial);
            Material modifiedMaterial = maskableGraphic.GetModifiedMaterial(baseMaterial);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, modifiedMaterial);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }