void OnEnable()
        {
            _CurrentWindow = this;

            EditorApplication.playmodeStateChanged += PlaymodeStateChanged;
        }
        void Initialize(ArborFSMInternal stateMachine)
        {
            Undo.RecordObject( this,"Select StateMachine" );

            _CurrentWindow = this;

            FinalizeStateEditor();

            _StateMachine = stateMachine;

            if( _StateMachine != null )
            {
                _StateMachineInstanceID = _StateMachine.GetInstanceID();
            }
            else
            {
                _StateMachineInstanceID = 0;
            }

            _Selection.Clear();

            Repaint();
        }