public void OnGUI()
        {
            CanvasGUI.Position = position;

            if (DateTime.Now - lastCheck >= ResourceManager.CheckRate)
            {
                if (!EditorCache.ValidateCanvas(cache))
                {
                    Debug.LogWarning("Loading last opened session.");
                    InitCanvas();
                    cache = EditorCache.LoadCache();
                }
                else
                {
                    cache.Init();
                }
                lastCheck = DateTime.Now;
            }

            InputSystem.EarlyInputEvents(cache.States);
            DialogueEditorGUI.OnGUI(cache.States);
            ToolBar();
            InputSystem.LateInputEvents(cache.States);
            cache.States.UpdateEvents();

            if (openDebug = CanvasGUI.Toggle(new Rect(5, 5, 130, 20), new GUIContent("Debug Window"), openDebug))
            {
                DebuggerWindow();
            }
        }