private VisualElement CreateToolBar(RootSOTreeView graphView)
        {
            return(new IMGUIContainer(
                       () =>
            {
                GUILayout.BeginHorizontal(EditorStyles.toolbar);

                if (!Application.isPlaying)
                {
                    if (GUILayout.Button("Save", EditorStyles.toolbarButton))
                    {
                        var guiContent = new GUIContent();
                        if (graphView.Save())
                        {
                            guiContent.text = "Successfully updated.";
                            this.ShowNotification(guiContent);
                        }
                        else
                        {
                            guiContent.text = "Invalid tree. one or mode nodes have error.";
                            this.ShowNotification(guiContent);
                        }
                    }
                }
                GUILayout.FlexibleSpace();
                GUILayout.EndHorizontal();
            }
                       ));
        }
        private static void StructGraphView(GraphEditorWindow window, RootSO behaviorTree)
        {
            window.rootVisualElement.Clear();
            var graphView = new RootSOTreeView(behaviorTree, window);

            graphView.Restore();
            window.rootVisualElement.Add(window.CreateToolBar(graphView));
            window.rootVisualElement.Add(graphView);
        }