public List <SceneObjectGraph> GetAllGraphs()
    {
        List <SceneObjectGraph> graphs = new List <SceneObjectGraph>();

        if (sceneGameObjects == null)
        {
            return(graphs);
        }

        foreach (var sceneGameObject in sceneGameObjects)
        {
            if (sceneGameObject.Value.data.graph != null &&
                (sceneGameObject.Value.data.graph.nodes.Count > 0 || sceneGameObject.Value.data.graph == showingGraph))
            {
                SceneObjectGraph sog = sceneGameObject.Value.data.graph;

                sog.linkedNTVariable = sceneGameObject.Value.data.id;
                sog.displayName      = sceneGameObject.Value.sceneObject.GetDisplayName();

                if (sog.variableDelegate == null)
                {
                    sog.variableDelegate = this;
                }

                graphs.Add(sceneGameObject.Value.data.graph);
            }
        }

        return(graphs);
    }
    public void OpenGraphFor(string key)
    {
        SceneGameObject sobj = GetSceneGameObject(key);

        if (sobj == null)
        {
            return;
        }

        if (sobj.data.graph == null)
        {
            SceneObjectGraph soc = new SceneObjectGraph();
            soc.linkedNTVariable = sobj.data.id;
            soc.variableDelegate = this;

            sobj.data.graph = soc;
        }

        showingGraph = sobj.data.graph;
        SetSelected(key);

        OnGraphListChanged.Invoke();
    }