Example #1
0
    static int IsRaycastLocationValid(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        RectMask2D obj  = (RectMask2D)LuaScriptMgr.GetUnityObjectSelf(L, 1, "RectMask2D");
        Vector2    arg0 = LuaScriptMgr.GetVector2(L, 2);
        Camera     arg1 = (Camera)LuaScriptMgr.GetUnityObject(L, 3, typeof(Camera));
        bool       o    = obj.IsRaycastLocationValid(arg0, arg1);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Example #2
0
    public static int IsRaycastLocationValid(IntPtr l)
    {
        int result;

        try
        {
            RectMask2D rectMask2D = (RectMask2D)LuaObject.checkSelf(l);
            Vector2    sp;
            LuaObject.checkType(l, 2, out sp);
            Camera eventCamera;
            LuaObject.checkType <Camera>(l, 3, out eventCamera);
            bool b = rectMask2D.IsRaycastLocationValid(sp, eventCamera);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, b);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }