SAnimatorStateInfo
في هذا الصنفIsName
| دالة | IsName | Does name match the name of the active state in the statemachine? |
| دالة | IsTag | Does tag match the tag of the active state in the statemachine. |
| خاصية | fullPathHash | The full path hash for this state. |
| خاصية | nameHash | The hashed name of the State. |
| خاصية | shortNameHash | The hash is generated using SAnimator.StringToHash. |
| خاصية | normalizedTime | Normalized time of the State. |
| خاصية | length | Current duration of the state. |
| خاصية | speed | The playback speed of the animation. 1 is the normal playback speed. |
| خاصية | speedMultiplier | _The speed multiplier for this state. |
| خاصية | tagHash | _The Tag of the State. |
| خاصية | loop | Is the state looping. |
| خاصية | Length | Current duration of the state. |
الدوال
IsName
Does name match the name of the active state in the statemachine?
المعاملات
| الاسم | النوع | القيمة الافتراضية |
|---|---|---|
| name | string | – |
القيم المرجعة
bool
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
AnimationStateInfo.isName("aStateName")
IsTag
Does tag match the tag of the active state in the statemachine.
المعاملات
| الاسم | النوع | القيمة الافتراضية |
|---|---|---|
| tag | string | – |
القيم المرجعة
bool
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
AnimationStateInfo.isTag("aStateTag")
الخصائص
fullPathHashللقراءة فقط
The full path hash for this state. The hash is generated using Animator.StringToHash.
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
fullPathHash = AnimationStateInfo.fullPathHash
nameHashللقراءة فقط
The hashed name of the State.
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
nameHash= AnimationStateInfo.nameHash
shortNameHashللقراءة فقط
The hash is generated using SAnimator.StringToHash. The hash does not include the name of the parent layer.
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
shortNameHash= AnimationStateInfo.shortNameHash
normalizedTimeللقراءة فقط
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.
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
normalizedTime= AnimationStateInfo.normalizedTime
lengthللقراءة فقط
Current duration of the state. In seconds Can vary when the State contains a Blend Tree.
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
length= AnimationStateInfo.length
speedللقراءة فقط
The playback speed of the animation. 1 is the normal playback speed. A negative playback speed will play the animation from the end.
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
speed= AnimationStateInfo.speed
speedMultiplierللقراءة فقط
_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._
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
speedMultiplier= AnimationStateInfo.speedMultiplier
tagHashللقراءة فقط
_The Tag of the State.
The hash is generated using SAnimator.StringToHash._
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
tagHash= AnimationStateInfo.tagHash
loopللقراءة فقط
Is the state looping. All animations in the state must be looping.
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
loop= AnimationStateInfo.loop
Lengthللقراءة فقط
Current duration of the state. In seconds Can vary when the State contains a Blend Tree
مثال
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
Length= AnimationStateInfo.Length



