AnimatorController.AddEffectiveStateMachineBehaviour

Switch to Manual
public StateMachineBehaviour AddEffectiveStateMachineBehaviour (Type stateMachineBehaviourType, Animations.AnimatorState state, int layerIndex);

Description

为层 layerIndex 向 AnimatorState 添加 stateMachineBehaviourType 类型的状态机行为类。在处理同步层并且要在同步层添加状态机行为时应使用此函数。C# 用户可以使用通用版本。

Note that there is no RemoveEffectiveStateMachineBehaviour(), to remove a state machine behaviour, use Object.Destroy.


public T AddEffectiveStateMachineBehaviour (Animations.AnimatorState state, int layerIndex);

Description

通用版本。有关更多详细信息,请参阅Generic Functions页面。