AnimatorStateTransition

Struct AnimatorStateTransition 

Source
pub struct AnimatorStateTransition {
Show 15 fields pub m_CanTransitionToSelf: bool, pub m_Conditions: Vec<AnimatorCondition>, pub m_DstState: PPtr, pub m_DstStateMachine: PPtr, pub m_ExitTime: f32, pub m_HasExitTime: bool, pub m_InterruptionSource: i32, pub m_IsExit: bool, pub m_Mute: bool, pub m_Name: String, pub m_OrderedInterruption: bool, pub m_Solo: bool, pub m_TransitionDuration: f32, pub m_TransitionOffset: f32, pub m_HasFixedDuration: Option<bool>,
}
Expand description

AnimatorStateTransition is a class of the Unity engine since version 5.0.0f4. Exert from Unity’s scripting documentation: Transitions define when and how the state machine switch from one state to another. AnimatorStateTransition always originate from an Animator State (or AnyState) and have timing parameters. A transition happens when all its conditions are met. AnimatorStateTransition derives from AnimatorTransitionBase.

Fields§

§m_CanTransitionToSelf: bool

Set to true to allow or disallow transition to self during AnyState transition.

§m_Conditions: Vec<AnimatorCondition>

AnimatorCondition conditions that need to be met for a transition to happen.

§m_DstState: PPtr

PPtr<AnimatorState>: (5.0.0f4 - 2022.3.2f1)

§m_DstStateMachine: PPtr

PPtr<AnimatorStateMachine>: (5.0.0f4 - 2022.3.2f1)

§m_ExitTime: f32

If 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.

§m_HasExitTime: bool

When active the transition will have an exit time condition.

§m_InterruptionSource: i32

Which AnimatorState transitions can interrupt the Transition.

§m_IsExit: bool

Is the transition destination the exit of the current state machine.

§m_Mute: bool

Mutes the transition. The transition will never occur.

§m_Name: String

The name of the object.

§m_OrderedInterruption: bool

The Transition can be interrupted by a transition that has a higher priority.

§m_Solo: bool

Mutes all other transitions in the source state.

§m_TransitionDuration: f32§m_TransitionOffset: f32§m_HasFixedDuration: Option<bool>

Determines whether the duration of the transition is reported in a fixed duration in seconds or as a normalized time. bool: (5.1.0f1 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for AnimatorStateTransition

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AnimatorStateTransition

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AnimatorStateTransition

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,