Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

AnimatorController.SetStateEffectiveMotion

public void SetStateEffectiveMotion(Animations.AnimatorState state, Motion motion);
public void SetStateEffectiveMotion(Animations.AnimatorState state, Motion motion, int layerIndex);

Parameters

state The AnimatorState which we want to set the Motion.
motion The Motion that will be set.
layerIndex The layer to set the Motion.

Description

Sets the effective Motion for the AnimatorState. The Motion is either stored in the AnimatorStateMachine or in the AnimatorLayer's ovverrides. Use this function to set the Motion that is effectively used.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答