SoloAnimation Class

Summary

Plays a single UnityEngine.AnimationClip.
Assembly
Animancer.dll
Namespace
Animancer
Interfaces
  • IAnimationClipSource
Base Types
  • MonoBehaviour
graph BT Type-->Base0["MonoBehaviour"] Type-.->Interface0["IAnimationClipSource"] Type["SoloAnimation"] class Type type-node

Syntax

[AddComponentMenu(Strings.MenuPrefix + "Solo Animation")]
[DefaultExecutionOrder(DefaultExecutionOrder)]
[HelpURL(Strings.DocsURLs.APIDocumentation + "/" + nameof(SoloAnimation))]
public class SoloAnimation : MonoBehaviour, IAnimationClipSource

Examples

Solo Animation

Remarks

Documentation: Component Types

Attributes

Type Description
AddComponentMenu
DefaultExecutionOrder
HelpURLAttribute

Fields

Name Constant Value Summary
DefaultExecutionOrder -5000
Initialize before anything else tries to use this component.
static

Properties

Name Value Summary
Animator Animator
[UnityEngine.SerializeField] The UnityEngine.Animator component which this script controls.
ApplyInEditMode bool
[Editor-Only] Should the Animancer.SoloAnimation.Clip be automatically applied to the object in Edit Mode?
Clip AnimationClip
[UnityEngine.SerializeField] The UnityEngine.AnimationClip that will be played.
FootIK bool
[UnityEngine.SerializeField] Should Foot IK will be applied to the model (if it is Humanoid)?
IsInitialized bool
Indicates whether the UnityEngine.Playables.PlayableGraph is valid.
IsPlaying bool
Is the animation playing (true) or paused (false)?
NormalizedTime float
The Animancer.SoloAnimation.Time of this state as a portion of the UnityEngine.AnimationClip.length, meaning the value goes from 0 to 1 as it plays from start to end, regardless of how long that actually takes.
Speed float
[UnityEngine.SerializeField] The speed at which the animation is playing (default 1).
StopOnDisable bool
If true, disabling this object will stop and rewind the animation. Otherwise it will simply be paused and will resume from its current state when it is re-enabled.
Time float
The number of seconds that have passed since the start of the animation.

Methods

Name Value Summary
~SoloAnimation() void
[Editor-Only] Ensures that the UnityEngine.Playables.PlayableGraph is destroyed.
GetAnimationClips(List<AnimationClip>) void
[UnityEngine.IAnimationClipSource] Adds the Animancer.SoloAnimation.Clip to the list.
OnDestroy() void
Ensures that the UnityEngine.Playables.PlayableGraph is properly cleaned up.
OnDisable() void
Ensures that the Animancer.SoloAnimation._Graph is properly cleaned up.
OnEnable() void
Plays the Animancer.SoloAnimation.Clip on the target Animancer.SoloAnimation.Animator.
OnValidate() void
[Editor-Only] Applies the Animancer.SoloAnimation.Speed, Animancer.SoloAnimation.FootIK, and Animancer.SoloAnimation.ApplyInEditMode.
Play() void
Plays the Animancer.SoloAnimation.Clip.
Play(AnimationClip) void
Plays the `clip`.
Reset() void
[Editor-Only] Tries to find an UnityEngine.Animator component on this UnityEngine.GameObject or its children or parents (in that order).
Update() void
Checks if the animation is done so it can pause the UnityEngine.Playables.PlayableGraph to improve performance.