Esempio n. 1
0
    void Start()
    {
        SessionManager.Instance.OnShowingGraphChanged.AddListener(ChangeGraph);
        SessionManager.Instance.OnGraphListChanged.AddListener(GrphListChanged);
        SessionManager.Instance.OnSessionLoaded.AddListener(SessionLoaded);

        runtimeGraph = GetComponentInChildren <RuntimeGraph>();
        runtimeGraph.SetGraph(SessionManager.Instance.sceneGraph);

        RefillTabs();
    }
Esempio n. 2
0
    private void ChangeGraph()
    {
        NodeGraph graph = SessionManager.Instance.showingGraph;

        runtimeGraph.SetGraph(graph);

        string key = GetCurrentKey();

        foreach (GraphTab tab in tabs)
        {
            if (tab.NTKey == key)
            {
                tab.isSelected = true;
            }
            else
            {
                tab.isSelected = false;
            }
        }
    }