static public int GetRectSize_(IntPtr l) { try { GameObject self = (GameObject)checkSelf(l); RectTransform rectTrans = ComponentUtil.NeedComponent_ <RectTransform>(self); var p = rectTrans.rect; pushValue(l, true); pushValue(l, p.width); pushValue(l, p.height); return(3); } catch (Exception e) { return(error(l, e)); } }
static public int SetPivotSmart_s(IntPtr l) { try { GameObject self = (GameObject)checkSelf(l); float x, y; checkType(l, 2, out x); checkType(l, 3, out y); RectTransform rectTrans = ComponentUtil.NeedComponent_ <RectTransform>(self); KuiUtil.SetPivotSmart(rectTrans, new Vector2(x, y), true); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }