// Handles Drawing things over the grid such as axes.
        private void DrawGridOverlay()
        {
            DrawAxes();
            DrawGridCenter();

            if (bDrawGuide)
            {
                DrawGuide();
                _window.Repaint();
            }
        }
        private static bool OpenGraphAsset(int instanceID, int line)
        {
            Debug.Log(instanceID);
            var graphSelected = EditorUtility.InstanceIDToObject(instanceID) as OSM_Graph;

            if (graphSelected != null)
            {
                OSM_EditorWindow windowToUse = null;

                // Try to find an editor window without a graph...
                var windows = Resources.FindObjectsOfTypeAll <OSM_EditorWindow>();
                foreach (var w in windows)
                {
                    // The canvas is already opened
                    if (w.Graph == graphSelected)
                    {
                        return(false);
                    }

                    // Found a window with no active canvas.
                    if (w.Graph == null)
                    {
                        windowToUse = w;
                        break;
                    }
                }

                // No windows available...just make a new one.
                if (!windowToUse)
                {
                    windowToUse = EditorWindow.CreateInstance <OSM_EditorWindow>();
                    windowToUse.titleContent = new GUIContent("Node Editor");
                    windowToUse.Show();
                }

                windowToUse.SetGraph(graphSelected);
                // windowToUse._saveManager.InitState();
                windowToUse.Repaint();

                return(true);
            }

            return(false);
        }