// Use this for initialization void Start() { animator = GetComponent <Animator>(); mixer = AnimationMixerPlayable.Create(); mixer.SetInputs(new[] { idle, walk }); animator.Play(mixer); }
void Start() { clip.wrapMode = WrapMode.Once; // Wrap the clip and the controller in playables clipPlayable = AnimationClipPlayable.Create(clip); controllerPlayable = AnimatorControllerPlayable.Create(animController); mixer = AnimationMixerPlayable.Create(); mixer.SetInputs(new Playable[] { clipPlayable, controllerPlayable }); }
public AnimationPlayableInstance(Animator _animator, AnimationPlayableBaseNode node) { animator = _animator; mixer = AnimationMixerPlayable.Create(); AnimationClip c = node.Inputs[0].GetValue <AnimationClip>(); AnimationClip[] sources = node.Inputs.Select(x => x.GetValue <AnimationClip>()).ToArray(); mixer.SetInputs(sources); }