public void TransitionTo(string i_SceneToLoad, Action i_LoadSceneCallback) { sceneToLoad = i_SceneToLoad; loadSceneCallback = i_LoadSceneCallback; TransitionWindow transitionWindow = (TransitionWindow)WindowManager.instance.ShowWindow(WindowID.ID.TransitionWindow); transitionWindow.OnEndFadeIn = LoadScene; transitionWindow.OnActivateAfterFade = ActivateAfterFade; }
// Rebuild the currently visible tree graph and recreate all the windows public void RebuildTreeGraph() { m_activeAnimationTrees = GameObject.FindObjectsOfType(typeof(AnimationTree)) as AnimationTree[]; m_Windows.Clear(); // Create a new window for all the active container's children if ( m_activeContainer != null ) { foreach( AT_Node node in m_activeContainer.Children ) { //for ( int i = 0; i < m_activeContainer.Children.Count; i++ ) //{ AddWindowForNode( node );// m_activeContainer.Children[i] ); //} } for (int i = 0; i < m_activeContainer.UnassignedChildren.Count; i++) { AddWindowForNode( m_activeContainer.UnassignedChildren[i] ); } } // Set the currently selected node's window as active foreach (NodeWindow window in m_Windows) { if (window.GetTreeNode().gameObject == Selection.activeGameObject) { window.Active = true; } } // Create control variables window RefreshVariablesWindow(); // Build up the list of transitions m_transitions.Clear(); AT_StateMachine sm = m_activeContainer as AT_StateMachine; if ( sm != null) { foreach (AT_StateTransition trans in sm.m_transitions) { if ( trans != null ) { TransitionWindow twin = new TransitionWindow(trans); m_transitions.Add(twin); m_Windows.Add(twin); } } } // The path at the top of the screen used for quick navigation RebuildPath(); }