protected void ComputeTransitionContexts() { this.m_TransitionContexts = new TransitionEditionContext[base.targets.Length]; UnityEditor.Graphs.AnimationStateMachine.Graph graph = (AnimatorControllerTool.tool == null) ? null : AnimatorControllerTool.tool.stateMachineGraph; UnityEditor.Graphs.AnimationStateMachine.GraphGUI hgui = (AnimatorControllerTool.tool == null) ? null : AnimatorControllerTool.tool.stateMachineGraphGUI; for (int i = 0; i < base.targets.Length; i++) { AnimatorTransitionBase aTransition = base.targets[i] as AnimatorTransitionBase; this.m_TransitionContexts[i] = new TransitionEditionContext(aTransition, null, null, null); if ((graph != null) && (hgui != null)) { foreach (int num2 in hgui.edgeGUI.edgeSelection) { EdgeInfo edgeInfo = graph.GetEdgeInfo(graph.edges[num2]); foreach (TransitionEditionContext context in edgeInfo.transitions) { if (context.transition == aTransition) { this.m_TransitionContexts[i] = context; } } } } } }
internal override UnityEditor.Graphs.GraphGUI GetEditor() { UnityEditor.Graphs.AnimationStateMachine.GraphGUI hgui = ScriptableObject.CreateInstance <UnityEditor.Graphs.AnimationStateMachine.GraphGUI>(); hgui.graph = this; hgui.hideFlags = HideFlags.HideAndDontSave; return(hgui); }