AnimatorStateTransition

class in UnityEditor.Animations

/

继承自:Animations.AnimatorTransitionBase

切换到手册

描述

过渡了定义状态机在何时以何种方式从一种状态切换为另一种状态。AnimatorStateTransition 始终源自一个 Animator State(或 AnyState)并有时间参数。

当所有过渡条件都满足时,过渡就会发生。AnimatorStateTransition 派生自 AnimatorTransitionBase

变量

canTransitionToSelf设置为 true 可允许或禁止在 AnyState 过渡期间向自身过渡。
duration过渡持续时间。
exitTimeIf AnimatorStateTransition.hasExitTime is true, exitTime represents the exact time at which the transition can take effect. This is represented in normalized time, so for example an exit time of 0.75 means that on the first frame where 75% of the animation has played, the Exit Time condition will be true. On the next frame, the condition will be false. For looped animations, transitions with exit times smaller than 1 will be evaluated every loop, so you can use this to time your transition with the proper timing in the animation, every loop. Transitions with exit times greater than one will be evaluated only once, so they can be used to exit at a specific time, after a fixed number of loops. For example, a transition with an exit time of 3.5 will be evaluated once, after three and a half loops.
hasExitTime生效时,过渡将有一个退出时间条件。
hasFixedDuration确定过渡的持续时间是以秒还是标准化时间为单位在固定的持续时间报告。
interruptionSource哪个 AnimatorState 过渡可以中断过渡。
offset目标状态的开始时间。
orderedInterruption过渡可被具有较高优先级的过渡中断。

构造函数

AnimatorStateTransition创建新的 Animator State 过渡。

继承的成员

变量

conditions过渡发生需要满足的 AnimatorCondition 条件。
destinationState过渡的目标状态。
destinationStateMachine过渡的目标状态机。
isExit作为当前状态机退出的过渡目标。
mute关闭过渡。过渡永远不会发生。
solo关闭源状态的所有其他过渡。

公共函数

AddConditionUtility 函数,用于添加一个过渡条件。
RemoveConditionUtility 函数,用于删除过渡条件。