UnityEditor.GUISlideGroup.GetRect C# (CSharp) Method

GetRect() public method

public GetRect ( int id, Rect r ) : Rect
id int
r UnityEngine.Rect
return UnityEngine.Rect
        public Rect GetRect(int id, Rect r)
        {
            bool flag;
            if (Event.current.type != EventType.Repaint)
            {
                return r;
            }
            return this.GetRect(id, r, out flag);
        }

Same methods

GUISlideGroup::GetRect ( int id, Rect r, bool &changed ) : Rect

Usage Example

示例#1
0
            public override void SetVertical(float y, float height)
            {
                m_FinalRect.y      = y;
                m_FinalRect.height = height;

                Rect r = new Rect(rect.x, y, rect.width, height);
                bool changed;

                r = m_Owner.GetRect(m_ID, r, out changed);

                if (changed)
                {
                    base.SetHorizontal(r.x, r.width);
                }
                base.SetVertical(r.y, r.height);
            }