protected override void OnInitialize()
        {
            wantsMouseMove = true;

            m_editor = ( BehaviorTreeControl )AddChild(new BehaviorTreeControl());
            m_editor.SetSize(100.0f, 100.0f, Control.MetricsUnits.Percentage, Control.MetricsUnits.Percentage);

            m_tools = ( BehaviorEditorSettingsControl )AddChild(new BehaviorEditorSettingsControl());
            m_tools.SetMargin(10.0f, 10.0f, 10.0f, 10.0f);
            m_tools.SetHeight(100.0f, Control.MetricsUnits.Percentage);

            m_tools.GenerateButton.Clicked += GenerateButton_Clicked;
            m_tools.NewButton.Clicked      += NewButton_Clicked;
            m_tools.SaveButton.Clicked     += SaveButton_Clicked;
            m_tools.LoadButton.Clicked     += LoadButton_Clicked;

            if (EditorPrefs.GetBool(TEMP_FILE_KEY, false))
            {
                LoadXML(Application.persistentDataPath + "/" + TEMP_FILENAME);
                EditorPrefs.SetBool(TEMP_FILE_KEY, false);
            }
        }
        protected override void OnInitialize()
        {
            wantsMouseMove = true;

            m_editor = ( BehaviorTreeControl )AddChild( new BehaviorTreeControl() );
            m_editor.SetSize( 100.0f, 100.0f, Control.MetricsUnits.Percentage, Control.MetricsUnits.Percentage );

            m_tools = ( BehaviorEditorSettingsControl )AddChild( new BehaviorEditorSettingsControl() );
            m_tools.SetMargin( 10.0f, 10.0f, 10.0f, 10.0f );
            m_tools.SetHeight( 100.0f, Control.MetricsUnits.Percentage );

            m_tools.GenerateButton.Clicked  += GenerateButton_Clicked;
            m_tools.NewButton.Clicked       += NewButton_Clicked;
            m_tools.SaveButton.Clicked      += SaveButton_Clicked;
            m_tools.LoadButton.Clicked      += LoadButton_Clicked;

            if ( EditorPrefs.GetBool( TEMP_FILE_KEY, false ) )
            {
                LoadXML( Application.persistentDataPath + "/" + TEMP_FILENAME );
                EditorPrefs.SetBool( TEMP_FILE_KEY, false );
            }
        }