protected override TimelineState CreateCopyFrom(SerializedObjectEditorGUI <TimelineState> editorGUI)
                {
                    TimelineStateEditorGUI timeLineGUI = (TimelineStateEditorGUI)editorGUI;
                    TimelineState          newState    = SerializeConverter.CreateCopy(timeLineGUI.GetEditableObject());

                    if (timeLineGUI.IsNote)
                    {
                        newState._editorDescription = timeLineGUI.GetEditorDescrition();
                    }
                    else
                    {
                        newState._editorDescription = timeLineGUI.GetEditorDescrition() + " (Copy)";
                        newState._stateId           = GenerateNewStateId();
                    }

                    return(newState);
                }
                private void RenderToolBar(Vector2 windowSize)
                {
                    EditorGUILayout.BeginVertical();
                    {
                        EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
                        {
                            string titleText = _title + " - <b>" + System.IO.Path.GetFileName(_currentFileName);

                            if (HasChanges() || _stateEditor.HasChanges())
                            {
                                titleText += "*";
                            }

                            titleText += "</b>";

                            EditorGUILayout.LabelField(titleText, _style._titleStyle);
                        }
                        EditorGUILayout.EndHorizontal();

                        EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
                        {
                            if (GUILayout.Button("New", EditorStyles.toolbarButton))
                            {
                                if (ShowOnLoadSaveChangesDialog())
                                {
                                    New();
                                }
                            }

                            if (GUILayout.Button("Load", EditorStyles.toolbarButton))
                            {
                                if (ShowOnLoadSaveChangesDialog())
                                {
                                    string fileName = EditorUtility.OpenFilePanel("Open File", Application.dataPath + "/gamedata", "xml");
                                    if (fileName != null && fileName != string.Empty)
                                    {
                                        LoadFile(fileName);
                                    }
                                }
                            }

                            if (GUILayout.Button("Save", EditorStyles.toolbarButton))
                            {
                                Save();
                            }

                            if (GUILayout.Button("Save As", EditorStyles.toolbarButton))
                            {
                                SaveAs();
                            }

                            EditorGUILayout.Space();

                            _editorPrefs._debug = GUILayout.Toggle(_editorPrefs._debug, "Debug StateMachine", EditorStyles.toolbarButton);

                            StateMachine currentDbugObject = _editorPrefs._debugObject.GetComponent();
                            StateMachine debugObject       = (StateMachine)EditorGUILayout.ObjectField(currentDbugObject, typeof(StateMachine), true);

                            if (currentDbugObject != debugObject)
                            {
                                _editorPrefs._debugObject.SetComponent(debugObject, GameObjectRef.eSourceType.Scene);
                                SaveEditorPrefs();
                            }


                            _editorPrefs._debugLockFocus = GUILayout.Toggle(_editorPrefs._debugLockFocus, "Lock Focus", EditorStyles.toolbarButton);

                            GUILayout.FlexibleSpace();
                        }
                        EditorGUILayout.EndHorizontal();

                        EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
                        {
                            if (_currentMode == eMode.ViewingState)
                            {
                                if (GUILayout.Button("Back", EditorStyles.toolbarButton))
                                {
                                    SwitchToStatemachineView();
                                }
                                else
                                {
                                    EditorGUILayout.Space();

                                    string stateText = "state" + ((int)(_editedState.GetStateId())).ToString("000") + " - <b>" + StringUtils.GetFirstLine(_editedState.GetEditorDescrition()) + "</b>";
                                    GUILayout.Toggle(true, stateText, _style._stateTitleStyle);

                                    GUILayout.FlexibleSpace();
                                }
                            }
                            else
                            {
                                GUILayout.Button("Zoom", EditorStyles.toolbarButton);

                                float zoom = EditorGUILayout.Slider(_currentZoom, 0.5f, 1.5f);

                                if (GUILayout.Button("Reset Zoom", EditorStyles.toolbarButton))
                                {
                                    zoom = 1.0f;
                                }

                                if (_currentZoom != zoom)
                                {
                                    _currentZoom = zoom;

                                    _editorPrefs._zoom = _currentZoom;
                                    SaveEditorPrefs();
                                }

                                if (GUILayout.Button("Center", EditorStyles.toolbarButton))
                                {
                                    CenterCamera();
                                }
                                GUILayout.FlexibleSpace();
                            }
                        }

                        EditorGUILayout.EndHorizontal();
                    }
                    EditorGUILayout.EndVertical();
                }