AnimatorState

Struct AnimatorState 

Source
pub struct AnimatorState {
Show 19 fields pub m_CycleOffset: f32, pub m_IKOnFeet: bool, pub m_Mirror: bool, pub m_Motion: PPtr, pub m_Name: String, pub m_Position: Vector3f, pub m_Speed: f32, pub m_StateMachineBehaviours: Vec<PPtr>, pub m_Tag: String, pub m_Transitions: Vec<PPtr>, pub m_WriteDefaultValues: bool, pub m_CycleOffsetParameter: Option<String>, pub m_CycleOffsetParameterActive: Option<bool>, pub m_MirrorParameter: Option<String>, pub m_MirrorParameterActive: Option<bool>, pub m_SpeedParameter: Option<String>, pub m_SpeedParameterActive: Option<bool>, pub m_TimeParameter: Option<String>, pub m_TimeParameterActive: Option<bool>,
}
Expand description

AnimatorState is a class of the Unity engine since version 5.0.0f4. Exert from Unity’s scripting documentation: States are the basic building blocks of a state machine. Each state contains a Motion ( AnimationClip or BlendTree) which will play while the character is in that state. When an event in the game triggers a state transition, the character will be left in a new state whose animation sequence will then take over.

Fields§

§m_CycleOffset: f32

Offset at which the animation loop starts. Useful for synchronizing looped animations.Units is normalized time.

§m_IKOnFeet: bool

Should Foot IK be respected for this state.

§m_Mirror: bool

Should the state be mirrored.

§m_Motion: PPtr

The motion assigned to this state. PPtr<[Motion]>: (5.0.0f4 - 2022.3.2f1)

§m_Name: String

The name of the object.

§m_Position: Vector3f§m_Speed: f32

The default speed of the motion.

§m_StateMachineBehaviours: Vec<PPtr>

Vec<PPtr<MonoBehaviour>>: (5.0.0f4 - 2022.3.2f1)

§m_Tag: String

A tag can be used to identify a state.

§m_Transitions: Vec<PPtr>

The transitions that are going out of the state. Vec<PPtr<AnimatorStateTransition>>: (5.0.0f4 - 2022.3.2f1)

§m_WriteDefaultValues: bool

Whether or not the AnimatorStates writes back the default values for properties that are not animated by its Motion.

§m_CycleOffsetParameter: Option<String>

The animator controller parameter that drives the cycle offset value. String: (5.1.0f1 - 2022.3.2f1)

§m_CycleOffsetParameterActive: Option<bool>

Define if the cycle offset value is driven by an Animator controller parameter or by the value set in the editor. bool: (5.1.0f1 - 2022.3.2f1)

§m_MirrorParameter: Option<String>

The animator controller parameter that drives the mirror value. String: (5.1.0f1 - 2022.3.2f1)

§m_MirrorParameterActive: Option<bool>

Define if the mirror value is driven by an Animator controller parameter or by the value set in the editor. bool: (5.1.0f1 - 2022.3.2f1)

§m_SpeedParameter: Option<String>

The animator controller parameter that drives the speed value. String: (5.1.0f1 - 2022.3.2f1)

§m_SpeedParameterActive: Option<bool>

Define if the speed value is driven by an Animator controller parameter or by the value set in the editor. bool: (5.1.0f1 - 2022.3.2f1)

§m_TimeParameter: Option<String>

If timeParameterActive is true, the value of this Parameter will be used instead of normalized time. String: (2017.2.0b2 - 2022.3.2f1)

§m_TimeParameterActive: Option<bool>

If true, use value of given Parameter as normalized time. bool: (2017.2.0b2 - 2022.3.2f1)

Trait Implementations§

Source§

impl Debug for AnimatorState

Source§

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

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

impl<'de> Deserialize<'de> for AnimatorState

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 AnimatorState

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>,