UnityEditor.OptimizedGUIBlock.Begin C# (CSharp) Method

Begin() public method

public Begin ( bool hasChanged, Rect position ) : bool
hasChanged bool
position UnityEngine.Rect
return bool
        public bool Begin(bool hasChanged, Rect position)
        {
            if (hasChanged)
            {
                this.m_Valid = false;
            }
            if (Event.current.type == EventType.Repaint)
            {
                if (GUIUtility.keyboardControl != this.m_KeyboardControl)
                {
                    this.m_Valid = false;
                    this.m_KeyboardControl = GUIUtility.keyboardControl;
                }
                if (DragAndDrop.activeControlID != this.m_ActiveDragControl)
                {
                    this.m_Valid = false;
                    this.m_ActiveDragControl = DragAndDrop.activeControlID;
                }
                if (GUI.color != this.m_GUIColor)
                {
                    this.m_Valid = false;
                    this.m_GUIColor = GUI.color;
                }
                position = GUIClip.Unclip(position);
                if (this.m_Valid && (position != this.m_Rect))
                {
                    this.m_Rect = position;
                    this.m_Valid = false;
                }
                if (!EditorGUI.isCollectingTooltips)
                {
                    if (this.m_Valid)
                    {
                        return false;
                    }
                    this.m_Recording = true;
                    this.BeginRecording();
                }
                return true;
            }
            if (Event.current.type == EventType.Used)
            {
                return false;
            }
            if (Event.current.type != EventType.Used)
            {
                this.m_WatchForUsed = true;
            }
            return true;
        }