private void DrawLeftSpace(Event e) { leftAreaLayout.Set( leftSpace.x + margin, leftSpace.y + margin, leftSpace.width - 2 * margin, leftSpace.height - margin ); GUILayout.BeginArea(leftAreaLayout); //leftScroll = GUILayout.BeginScrollView(leftScroll); GUILayout.BeginHorizontal(); GUILayout.Label(new GUIContent("Controller"), GUILayout.MaxWidth(100)); this.animator = (MM_AnimatorController)EditorGUILayout.ObjectField( this.animator, typeof(MM_AnimatorController), true ); GUILayout.EndHorizontal(); animatorOptions.Draw_1(leftAreaLayout, ref leftWidthFactor, this); GUILayout.Space(margin); //GUILayout.EndScrollView(); GUILayout.EndArea(); }
public void SetAnimatorAndLayerIndex(MM_AnimatorController animator, int selectedLayerIndex) { this.animator = animator; if (this.animator != null) { if (selectedLayerIndex >= 0 && selectedLayerIndex < animator.layers.Count) { selectedLayer = this.animator.layers[selectedLayerIndex]; } else { selectedLayer = null; } if (currentAnimatorID != this.animator.GetInstanceID()) { currentAnimatorID = this.animator.GetInstanceID(); OnAnimatorChange(); } } else { selectedLayer = null; } }
public void SetAnimator(MM_AnimatorController animator) { this.animator = animator; if (this.animator != null) { if (currentAnimatorID != this.animator.GetInstanceID()) { currentAnimatorID = this.animator.GetInstanceID(); layerList = new ReorderableList(animator.layers, typeof(MotionMatchingLayer)); floats = new ReorderableList(animator.floatNames, typeof(string)); ints = new ReorderableList(animator.intNames, typeof(string)); bools = new ReorderableList(animator.boolNames, typeof(string)); } } }
private void SetAsset(MM_AnimatorController asset) { this.animator = asset; }
public LayersAndParametersSpace(MM_AnimatorController animator) { this.animator = animator; }