static int AddClippable(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 2); RectMask2D obj = (RectMask2D)LuaScriptMgr.GetUnityObjectSelf(L, 1, "RectMask2D"); IClippable arg0 = (IClippable)LuaScriptMgr.GetNetObject(L, 2, typeof(IClippable)); obj.AddClippable(arg0); return(0); }
//^^^^^^^^ Unity Callbacks ^^^^^^^^ //vvvvvvvv IClipable Implements vvvvvvvv /// <summary> /// Called when the state of a parent IClippable changes. /// </summary> public void RecalculateClipping() { m_Masks.Clear(); RectMask2D rectMask2D = isActiveAndEnabled && rectTransform?MaskUtilities.GetRectMaskForClippable(this) : null; if (m_ParentMask != null && (rectMask2D != m_ParentMask || !rectMask2D.IsActive())) { m_ParentMask.RemoveClippable(this); } if (rectMask2D != null && rectMask2D.IsActive()) { rectMask2D.AddClippable(this); MaskUtilities.GetRectMasksForClip(rectMask2D, m_Masks); } m_ParentMask = rectMask2D; }
public static int AddClippable(IntPtr l) { int result; try { RectMask2D rectMask2D = (RectMask2D)LuaObject.checkSelf(l); IClippable clippable; LuaObject.checkType <IClippable>(l, 2, out clippable); rectMask2D.AddClippable(clippable); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }