SAnimatorStateInfo
Dans cette classeIsName
| Fonction | IsName | Does name match the name of the active state in the statemachine? |
| Fonction | IsTag | Does tag match the tag of the active state in the statemachine. |
| Propriété | fullPathHash | The full path hash for this state. |
| Propriété | nameHash | The hashed name of the State. |
| Propriété | shortNameHash | The hash is generated using SAnimator.StringToHash. |
| Propriété | normalizedTime | Normalized time of the State. |
| Propriété | length | Current duration of the state. |
| Propriété | speed | The playback speed of the animation. 1 is the normal playback speed. |
| Propriété | speedMultiplier | _The speed multiplier for this state. |
| Propriété | tagHash | _The Tag of the State. |
| Propriété | loop | Is the state looping. |
| Propriété | Length | Current duration of the state. |
Fonctions
IsName
Does name match the name of the active state in the statemachine?
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| name | string | – |
Valeurs de retour
bool
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
AnimationStateInfo.isName("aStateName")
IsTag
Does tag match the tag of the active state in the statemachine.
Paramètres
| Nom | Type | Valeur par défaut |
|---|---|---|
| tag | string | – |
Valeurs de retour
bool
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
AnimationStateInfo.isTag("aStateTag")
Propriétés
fullPathHashLecture seule
The full path hash for this state. The hash is generated using Animator.StringToHash.
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
fullPathHash = AnimationStateInfo.fullPathHash
nameHashLecture seule
The hashed name of the State.
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
nameHash= AnimationStateInfo.nameHash
shortNameHashLecture seule
The hash is generated using SAnimator.StringToHash. The hash does not include the name of the parent layer.
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
shortNameHash= AnimationStateInfo.shortNameHash
normalizedTimeLecture seule
Normalized time of the State. The integer part is the number of time a state has been looped. The fractional part is the % (0-1) of progress in the current loop.
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
normalizedTime= AnimationStateInfo.normalizedTime
lengthLecture seule
Current duration of the state. In seconds Can vary when the State contains a Blend Tree.
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
length= AnimationStateInfo.length
speedLecture seule
The playback speed of the animation. 1 is the normal playback speed. A negative playback speed will play the animation from the end.
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
speed= AnimationStateInfo.speed
speedMultiplierLecture seule
_The speed multiplier for this state.
A negative speed multiplier will play the animation backwards. If no speed parameter as been set for this SAnimatorState, the default value will be 1._
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
speedMultiplier= AnimationStateInfo.speedMultiplier
tagHashLecture seule
_The Tag of the State.
The hash is generated using SAnimator.StringToHash._
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
tagHash= AnimationStateInfo.tagHash
loopLecture seule
Is the state looping. All animations in the state must be looping.
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
loop= AnimationStateInfo.loop
LengthLecture seule
Current duration of the state. In seconds Can vary when the State contains a Blend Tree
Exemple
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
Length= AnimationStateInfo.Length



