Summary
[Pro-Only]
A
Animancer.NamedAnimancerComponent
which plays a main UnityEngine.RuntimeAnimatorController
with the ability to play other individual UnityEngine.AnimationClip
s separately.
- Assembly
- Animancer
.dll - Namespace
- Animancer
- Interfaces
-
- IAnimancerComponent
- IEnumerator
- IAnimationClipSource
- I
Animation Clip Collection
- Base Types
-
- MonoBehaviour
- AnimancerComponent
- Named
Animancer Component
graph BT
Type-->Base0["NamedAnimancerComponent"]
click Base0 "/animancer/api/Animancer/NamedAnimancerComponent"
Base0-->Base1["AnimancerComponent"]
click Base1 "/animancer/api/Animancer/AnimancerComponent"
Base1-->Base2["MonoBehaviour"]
Type-.->Interface0["IAnimancerComponent"]
click Interface0 "/animancer/api/Animancer/IAnimancerComponent"
Type-.->Interface1["IEnumerator"]
Type-.->Interface2["IAnimationClipSource"]
Type-.->Interface3["IAnimationClipCollection"]
click Interface3 "/animancer/api/Animancer/IAnimationClipCollection"
Type["HybridAnimancerComponent"]
class Type type-node
Syntax
[AddComponentMenu(Strings.MenuPrefix + "Hybrid Animancer Component")]
[AnimancerHelpUrl(typeof(HybridAnimancerComponent))]
public class HybridAnimancerComponent : NamedAnimancerComponent, IAnimancerComponent, IEnumerator,
IAnimationClipSource, IAnimationClipCollection
Remarks
Documentation:
Hybrid
Attributes
Type | Description |
---|---|
AddComponentMenu | |
Animancer |
[Assert-Conditional]
A UnityEngine.HelpURLAttribute which points to Animancer's documentation.
|
Fields
Name | Constant Value | Summary |
---|---|---|
Default |
-5000 |
Initialize before anything else tries to use this component.
Inherited from AnimancerComponent
static
|
Properties
Name | Value | Summary |
---|---|---|
ActionOnDisable | AnimancerComponent |
[
UnityEngine.SerializeField ]
Determines what happens when this component is disabled
or its UnityEngine.GameObject becomes inactive
(i.e. in Animancer.AnimancerComponent.OnDisable ).
Inherited from AnimancerComponent
|
angularVelocity | Vector3 |
UnityEngine.Animator.angularVelocity |
Animations | AnimationClip[] |
[
UnityEngine.SerializeField ]
Animations in this array will be automatically registered by Animancer.NamedAnimancerComponent.Awake as states that can be
retrieved using their name and the first element will be played by Animancer.NamedAnimancerComponent.OnEnable if
Animancer.NamedAnimancerComponent.PlayAutomatically is true.
Inherited from Named
|
Animator | Animator |
[
UnityEngine.SerializeField ]
Animancer works by using Unity's Playables API to control an UnityEngine.Animator component.
Inherited from AnimancerComponent
|
applyRootMotion | bool |
UnityEngine.Animator.applyRootMotion |
avatar | Avatar |
UnityEngine.Animator.avatar |
bodyPosition | Vector3 |
UnityEngine.Animator.bodyPosition |
bodyRotation | Quaternion |
UnityEngine.Animator.bodyRotation |
Controller | ControllerTransition |
[
UnityEngine.SerializeField ]
The transition containing the main UnityEngine.RuntimeAnimatorController that this object plays.
|
ControllerPlayable | Animator |
The
UnityEngine.Playables.Playable of the Animancer.ControllerState . |
cullingMode | AnimatorCullingMode |
UnityEngine.Animator.cullingMode |
DefaultAnimation | AnimationClip |
The first element in the
Animancer.NamedAnimancerComponent.Animations array. It will be automatically played by
Animancer.NamedAnimancerComponent.OnEnable if Animancer.NamedAnimancerComponent.PlayAutomatically is true.
Inherited from Named
|
deltaPosition | Vector3 |
UnityEngine.Animator.deltaPosition |
deltaRotation | Quaternion |
UnityEngine.Animator.deltaRotation |
Events | NamedEventDictionary |
A dictionary of callbacks to be triggered by any event with a matching name.
Inherited from AnimancerComponent
|
feetPivotActive | float |
UnityEngine.Animator.feetPivotActive |
fireEvents | bool |
UnityEngine.Animator.fireEvents |
Graph | AnimancerGraph |
The internal system which manages the playing animations.
Accessing this property will automatically initialize it.
Inherited from AnimancerComponent
|
gravityWeight | float |
UnityEngine.Animator.gravityWeight |
hasBoundPlayables | bool |
UnityEngine.Animator.hasBoundPlayables |
hasRootMotion | bool |
UnityEngine.Animator.hasRootMotion |
has |
bool |
UnityEngine.Animator.hasTransformHierarchy |
humanScale | float |
UnityEngine.Animator.humanScale |
InitialUpdateMode | Nullable |
[Editor-Only] The
Animancer.IAnimancerComponent.UpdateMode that was first used when this script initialized.Inherited from AnimancerComponent
|
IsGraphInitialized | bool |
Has the
Animancer.AnimancerComponent.Graph been initialized?Inherited from AnimancerComponent
|
isHuman | bool |
UnityEngine.Animator.isHuman |
isInitialized | bool |
UnityEngine.Animator.isInitialized |
isOptimizable | bool |
UnityEngine.Animator.isOptimizable |
keep |
bool |
UnityEngine.Animator.keepAnimatorStateOnDisable |
layerCount | int |
The number of layers in the
Animancer.HybridAnimancerComponent.Controller . |
Layers | AnimancerLayerList |
The layers which each manage their own set of animations.
Inherited from AnimancerComponent
|
layers |
bool |
UnityEngine.Animator.layersAffectMassCenter |
leftFeetBottomHeight | float |
UnityEngine.Animator.leftFeetBottomHeight |
logWarnings | bool |
UnityEngine.Animator.logWarnings |
parameterCount | int |
The number of parameters in the
Animancer.HybridAnimancerComponent.Controller . |
parameters | Animator |
The parameters in the
Animancer.HybridAnimancerComponent.Controller . |
Parameters | ParameterDictionary |
Dynamic parameters which anything can get or set.
Inherited from AnimancerComponent
|
pivotPosition | Vector3 |
UnityEngine.Animator.pivotPosition |
pivotWeight | float |
UnityEngine.Animator.pivotWeight |
playableGraph | PlayableGraph |
Animancer.AnimancerGraph.PlayableGraph |
PlayAutomatically | bool |
[
UnityEngine.SerializeField ]
If true, the first clip in the Animancer.NamedAnimancerComponent.Animations array will be automatically played by
Animancer.NamedAnimancerComponent.OnEnable .
Inherited from Named
|
right |
float |
UnityEngine.Animator.rightFeetBottomHeight |
rootPosition | Vector3 |
UnityEngine.Animator.rootPosition |
rootRotation | Quaternion |
UnityEngine.Animator.rootRotation |
runtime |
Runtime |
Animancer.HybridAnimancerComponent.Controller |
speed | float |
Wraps the
Animancer.HybridAnimancerComponent.Speed property with the same name as UnityEngine.Animator.speed . |
Speed | float |
The
AnimancerNode.Speed of the Animancer.HybridAnimancerComponent.Controller . |
stabilizeFeet | bool |
UnityEngine.Animator.stabilizeFeet |
States | Animancer |
The states managed by this component.
Inherited from AnimancerComponent
|
Transitions | Transition |
[
UnityEngine.SerializeField ] [Pro-Only]
An optional Animancer.TransitionLibraries.TransitionLibraryAsset
which can modify the way Animancer transitions between animations.
Inherited from AnimancerComponent
|
updateMode | AnimatorUpdateMode |
UnityEngine.Animator.updateMode |
UpdateMode | AnimatorUpdateMode |
Determines when animations are updated and which time source is used. This property is mainly a wrapper
around the
UnityEngine.Animator.updateMode .
Inherited from AnimancerComponent
|
velocity | Vector3 |
UnityEngine.Animator.velocity |
Methods
Name | Value | Summary |
---|---|---|
~AnimancerComponent |
void |
[Editor-Only]
Ensures that the
Animancer.AnimancerGraph is destroyed in Edit Mode, but not in Play Mode since we want
to let Unity complain if that happens.
Inherited from AnimancerComponent
|
Apply |
void |
UnityEngine.Animator.ApplyBuiltinRootMotion |
Awake |
void |
Creates a state for each clip in the
Animancer.NamedAnimancerComponent.Animations array.Inherited from Named
|
CrossFade |
void |
Starts a transition from the current state to the specified state using normalized times.
|
CrossFade |
AnimancerState |
Starts a transition from the current state to the specified state using normalized times.
|
CrossFadeInFixedTime |
void |
Starts a transition from the current state to the specified state using times in seconds.
|
CrossFadeInFixedTime |
AnimancerState |
Starts a transition from the current state to the specified state using times in seconds.
|
Evaluate |
void |
Immediately applies the current states of all animations to the animated objects.
Inherited from AnimancerComponent
|
Evaluate |
void |
Advances time by the specified value (in seconds) and immediately applies the current states of all
animations to the animated objects.
Inherited from AnimancerComponent
|
GatherAnimationClips |
void | |
GetAnimationClips |
void |
[
UnityEngine.IAnimationClipSource ]
Calls Animancer.AnimancerComponent.GatherAnimationClips(System.Collections.Generic.ICollection{UnityEngine.AnimationClip}) .
Inherited from AnimancerComponent
|
Get |
Animator |
Gets information about the current transition.
|
GetBehaviour |
T |
UnityEngine.Animator.GetBehaviour``1 |
GetBehaviours |
State |
UnityEngine.Animator.GetBehaviours(System.Int32,System.Int32) |
GetBehaviours |
T[] |
UnityEngine.Animator.GetBehaviours``1 |
GetBoneTransform |
Transform |
UnityEngine.Animator.GetBoneTransform(UnityEngine.HumanBodyBones) |
GetBool |
bool |
Gets the value of the specified boolean parameter.
|
GetBool |
bool |
Gets the value of the specified boolean parameter.
|
Get |
AnimatorClipInfo[] |
Gets information about the
UnityEngine.AnimationClip s currently being played. |
Get |
void |
Gets information about the
UnityEngine.AnimationClip s currently being played. |
Get |
int |
Gets the number of
UnityEngine.AnimationClip s currently being played. |
Get |
AnimatorStateInfo |
Returns information about the current state.
|
GetFloat |
float |
Gets the value of the specified float parameter.
|
GetFloat |
float |
Gets the value of the specified float parameter.
|
GetInteger |
int |
Gets the value of the specified integer parameter.
|
GetInteger |
int |
Gets the value of the specified integer parameter.
|
GetKey |
Object |
Returns the clip's name.
Inherited from Named
|
GetLayerCount |
int |
Gets the number of layers in the
Animancer.HybridAnimancerComponent.Controller . |
GetLayerIndex |
int |
Gets the index of the layer with the specified name.
|
GetLayerName |
string |
Gets the name of the layer with the specified index.
|
GetLayerWeight |
float |
Gets the weight of the layer at the specified index.
|
Get |
AnimatorClipInfo[] |
Gets information about the
UnityEngine.AnimationClip s currently being transitioned towards. |
Get |
void |
Gets information about the
UnityEngine.AnimationClip s currently being transitioned towards. |
Get |
int |
Gets the number of
UnityEngine.AnimationClip s currently being transitioned towards. |
Get |
AnimatorStateInfo |
Returns information about the next state being transitioned towards.
|
GetParameter |
Animator |
Gets the details of one of the
Animancer.HybridAnimancerComponent.Controller 's parameters. |
GetParameterCount |
int |
Gets the number of parameters in the
Animancer.HybridAnimancerComponent.Controller . |
HasState |
bool |
Indicates whether the specified layer contains the specified state.
|
InitializeGraph |
void |
Creates and initializes the
Animancer.AnimancerComponent.Graph if it wasn't already initialized.Inherited from AnimancerComponent
|
InitializePlayable |
void |
Sets the
Animancer.AnimancerComponent.Graph and connects it to the Animancer.AnimancerComponent.Animator .Inherited from AnimancerComponent
|
IsInTransition |
bool |
Indicates whether the specified layer is currently executing a transition.
|
Is |
bool |
Indicates whether the specified parameter is controlled by an
UnityEngine.AnimationClip . |
Is |
bool |
Indicates whether the specified parameter is controlled by an
UnityEngine.AnimationClip . |
IsPlaying |
bool |
Returns true if at least one animation is being played.
Inherited from AnimancerComponent
|
IsPlaying |
bool |
[Warning]
You should not use an
Animancer.AnimancerState as a key.
Just check Animancer.AnimancerState.IsPlaying .
Inherited from AnimancerComponent
|
IsPlaying |
bool |
Returns true if a state is registered for the `clip` and it is currently playing.
The actual dictionary key is determined using
Animancer.AnimancerComponent.GetKey(UnityEngine.AnimationClip) .
Inherited from AnimancerComponent
|
IsPlaying |
bool |
Returns true if a state is registered with the
Animancer.IHasKey.Key and it is currently playing.
Inherited from AnimancerComponent
|
IsPlaying |
bool |
Returns true if a state is registered with the `key` and it is currently playing.
Inherited from AnimancerComponent
|
IsPlayingClip |
bool |
Returns true if the `clip` is currently being played by at least one state.
This method is inefficient because it searches through every state to find any that are playing the `clip`,
unlike
Animancer.AnimancerComponent.IsPlaying(UnityEngine.AnimationClip) which only checks the state registered using the `clip`s key.
Inherited from AnimancerComponent
|
OnDestroy |
void |
Ensures that the
Animancer.AnimancerComponent.Graph is properly cleaned up.Inherited from AnimancerComponent
|
OnDisable |
void |
Acts according to the
Animancer.AnimancerComponent.ActionOnDisable .Inherited from AnimancerComponent
|
OnEnable |
void |
Plays the
Animancer.HybridAnimancerComponent.Controller if PlayAutomatically is false (otherwise it plays the
first animation in the Animancer.NamedAnimancerComponent.Animations array).
|
OnInitializeGraph |
void |
Sets
Animancer.AnimancerGraph.KeepChildrenConnected to true in order to avoid some
undesirable behaviours caused by disconnecting UnityEngine.Animations.AnimatorControllerPlayable s from the graph.
|
OnValidate |
void |
[Editor-Only]
Uses
ClipState.ValidateClip to ensure that all of the clips in the Animancer.NamedAnimancerComponent.Animations
array are supported by the Animancer system and removes any others.
Inherited from Named
|
Play |
AnimancerState |
Stops all other animations on the same layer, plays the `state`, and returns it.
Inherited from AnimancerComponent
|
Play |
AnimancerState |
Starts fading in the `state` while fading out all others in the same layer over the course of the
`fadeDuration`. Returns the `state`.
Inherited from AnimancerComponent
|
Play |
AnimancerState |
Stops all other animations on the same layer, plays the `clip`, and returns its state.
Inherited from AnimancerComponent
|
Play |
AnimancerState |
Starts fading in the `clip` while fading out all other states in the same layer over the course of the
`fadeDuration`. Returns its state.
Inherited from AnimancerComponent
|
Play |
void |
Plays the specified state immediately, starting from a particular normalized time.
|
Play |
AnimancerState |
Creates a state for the `transition` if it didn't already exist, then calls
Animancer.AnimancerComponent.Play(Animancer.AnimancerState) or Animancer.AnimancerComponent.Play(Animancer.AnimancerState,System.Single,Animancer.FadeMode)
depending on ITransition.CrossFadeFromStart .
Inherited from AnimancerComponent
|
Play |
AnimancerState |
Creates a state for the `transition` if it didn't already exist, then calls
Animancer.AnimancerComponent.Play(Animancer.AnimancerState) or Animancer.AnimancerComponent.Play(Animancer.AnimancerState,System.Single,Animancer.FadeMode)
depending on ITransition.CrossFadeFromStart .
Inherited from AnimancerComponent
|
Play |
AnimancerState |
Plays the specified state immediately, starting from a particular normalized time.
|
PlayController |
ControllerState |
Transitions to the
Animancer.HybridAnimancerComponent.Controller over its specified
Animancer.Transition`1.FadeDuration and returns the
Animancer.Transition`1.State .
|
PlayInFixedTime |
void |
Plays the specified state immediately, starting from a particular time (in seconds).
|
PlayInFixedTime |
AnimancerState |
Plays the specified state immediately, starting from a particular time (in seconds).
|
Rebind |
void |
UnityEngine.Animator.Rebind |
Reset |
void |
[Editor-Only]
Sets
PlayAutomatically = false by default so that Animancer.HybridAnimancerComponent.OnEnable will play the
Animancer.HybridAnimancerComponent.Controller instead of the first animation in the
Animancer.NamedAnimancerComponent.Animations array.
|
ResetTrigger |
void |
Resets the specified trigger parameter to false.
|
ResetTrigger |
void |
Resets the specified trigger parameter to false.
|
SetBoneLocalRotation |
void |
UnityEngine.Animator.SetBoneLocalRotation(UnityEngine.HumanBodyBones,UnityEngine.Quaternion) |
SetBool |
void |
Sets the value of the specified boolean parameter.
|
SetBool |
void |
Sets the value of the specified boolean parameter.
|
SetFloat |
void |
Sets the value of the specified float parameter.
|
SetFloat |
float |
Sets the value of the specified float parameter with smoothing.
|
SetFloat |
void |
Sets the value of the specified float parameter.
|
SetFloat |
float |
Sets the value of the specified float parameter with smoothing.
|
SetInteger |
void |
Sets the value of the specified integer parameter.
|
SetInteger |
void |
Sets the value of the specified integer parameter.
|
SetLayerWeight |
void |
Sets the weight of the layer at the specified index.
|
SetTrigger |
void |
Sets the specified trigger parameter to true.
|
SetTrigger |
void |
Sets the specified trigger parameter to true.
|
Stop |
void |
Stops all animations and rewinds them to the start.
Inherited from AnimancerComponent
|
Stop |
AnimancerState |
[Warning]
You should not use an
Animancer.AnimancerState as a key.
Just call AnimancerState.Stop .
Inherited from AnimancerComponent
|
Stop |
AnimancerState |
Gets the state associated with the `clip`, stops and rewinds it to the start, then returns it.
Inherited from AnimancerComponent
|
Stop |
AnimancerState |
Gets the state registered with the
Animancer.IHasKey.Key , stops and rewinds it to the start, then
returns it.
Inherited from AnimancerComponent
|
Stop |
AnimancerState |
Gets the state associated with the `key`, stops and rewinds it to the start, then returns it.
Inherited from AnimancerComponent
|
TryGetAnimator |
bool |
Tries to ensure that an
Animancer.AnimancerComponent.Animator is present using
UnityEngine.Component.TryGetComponent``1(``0@) if necessary.
Inherited from AnimancerComponent
|
TryPlay |
AnimancerState |
Stops all other animations on the base layer,
plays the animation registered with the `key`,
and returns the animation's state.
Inherited from AnimancerComponent
|
TryPlay |
AnimancerState |
Starts fading in the animation registered with the `key`
while fading out all others in the same layer over the course of the `fadeDuration`
and returns the animation's state.
Inherited from AnimancerComponent
|
TryPlay |
AnimancerState |
Stops all other animations on the base layer,
plays the animation registered with the `key`,
and returns the animation's state.
Inherited from AnimancerComponent
|
TryPlay |
AnimancerState |
Starts fading in the animation registered with the `key` while fading out all others in the same layer
over the course of the `fadeDuration`. Or if no state is registered with that `key`, this method does
nothing and returns null.
Inherited from AnimancerComponent
|
Operators
Name | Value | Summary |
---|---|---|
implicit operator |
AnimancerGraph |
Inherited from AnimancerComponent
|
implicit operator |
AnimancerLayer |
Inherited from AnimancerComponent
|
Extension Methods
Name | Value | Summary |
---|---|---|
Update |
void |
Advances time by the specified value (in seconds) and immediately applies the current states of all
animations to the animated objects.
|