pub struct Animation {
    pub m_AnimatePhysics: bool,
    pub m_Animation: PPtr,
    pub m_Animations: Vec<PPtr>,
    pub m_CullingType: i32,
    pub m_Enabled: u8,
    pub m_GameObject: PPtr,
    pub m_PlayAutomatically: bool,
    pub m_WrapMode: i32,
    pub m_UserAABB: Option<AABB>,
}
Expand description

Animation is a class of the Unity engine since version 3.4.0. Exert from Unity’s scripting documentation: The animation component is used to play back animations. You can assign animation clips to the animation component and control playback from your script.

The animation system in Unity is weight-based and supports Animation Blending, Additive animations, Animation Mixing, Layers and full control over all aspects of playback.For an overview of animation scripting in Unity please read this introduction.AnimationState can be used to change the layer of an animation, modify playback speed, and for direct control over blending and mixing.Also Animation supports enumerators. Looping through all AnimationStates is performed like this: See Also: An overview of animation scripting in Unity is here.

Fields§

§m_AnimatePhysics: bool

When turned on, animations will be executed in the physics loop. This is only useful in conjunction with kinematic rigidbodies.

§m_Animation: PPtr

PPtr<AnimationClip>: (3.4.0 - 2022.3.2f1)

§m_Animations: Vec<PPtr>

Vec<PPtr<AnimationClip>>: (3.4.0 - 2022.3.2f1)

§m_CullingType: i32

Controls culling of this Animation component.

§m_Enabled: u8

Enabled Behaviours are Updated, disabled Behaviours are not.

§m_GameObject: PPtr

The game object this component is attached to. A component is always attached to a game object. PPtr<GameObject>: (3.4.0 - 2022.3.2f1)

§m_PlayAutomatically: bool

Should the default animation clip (the Animation.clip property) automatically start playing on startup?

§m_WrapMode: i32

How should time beyond the playback range of the clip be treated?

§m_UserAABB: Option<AABB>

AABB: (3.4.0 - 4.2.2)

Trait Implementations§

source§

impl Debug for Animation

source§

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

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

impl<'de> Deserialize<'de> for Animation

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 Animation

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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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 Twhere T: for<'de> Deserialize<'de>,