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(); }
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; } } }