public override void OnInspectorGUI()
 {
     this.SyncTransitionContexts();
     AnimatorTransitionInspectorBase.InitStyles();
     if (this.showTransitionList)
     {
         this.m_TransitionList.DoLayoutList();
     }
     if (this.m_SerializedTransition == null)
     {
         return;
     }
     this.m_SerializedTransition.Update();
     this.m_SingleTransitionHeader = true;
     Editor.DrawHeaderGUI(this, string.Empty);
     this.m_SingleTransitionHeader = false;
     this.DoPreview();
     EditorGUI.indentLevel = 0;
     GUILayout.Space(10f);
     if (this.m_ConditionList != null)
     {
         this.m_ConditionList.DoLayoutList();
     }
     this.m_SerializedTransition.ApplyModifiedProperties();
     this.DoErrorAndWarning();
 }
Exemple #2
0
        private void SelectTransition(ReorderableList list)
        {
            AnimatorTransitionBase transition = this.m_Transitions[list.index].transition;

            if (transition == null)
            {
                return;
            }
            if (this.m_Type == TransitionType.eState || this.m_Type == TransitionType.eAnyState)
            {
                this.m_TransitionInspector = (Editor.CreateEditor(transition as AnimatorStateTransition) as AnimatorStateTransitionInspector);
            }
            else
            {
                this.m_TransitionInspector = (Editor.CreateEditor(transition as AnimatorTransition) as AnimatorTransitionInspector);
            }
            this.m_TransitionInspector.SetTransitionContext(this.m_Transitions[list.index]);
            this.m_TransitionInspector.showTransitionList = false;
        }
 private void DrawTransitionElement(Rect rect, int index, bool selected, bool focused)
 {
     AnimatorTransitionInspectorBase.DrawTransitionElementCommon(rect, this.m_TransitionContexts[index], selected, focused);
 }