Breakroom is now Sinewave Campus. Book a meeting

SAnimatorStateInfo

العميلالأنواع
في هذا الصنفIsName
  1. الدوال
  2. IsName
  3. IsTag
  4. الخصائص
  5. fullPathHash
  6. nameHash
  7. shortNameHash
  8. normalizedTime
  9. length
  10. speed
  11. speedMultiplier
  12. tagHash
  13. loop
  14. Length
الأعضاء 12
دالةIsNameDoes name match the name of the active state in the statemachine?
دالةIsTagDoes tag match the tag of the active state in the statemachine.
خاصيةfullPathHashThe full path hash for this state.
خاصيةnameHashThe hashed name of the State.
خاصيةshortNameHashThe hash is generated using SAnimator.StringToHash.
خاصيةnormalizedTimeNormalized time of the State.
خاصيةlengthCurrent duration of the state.
خاصيةspeedThe playback speed of the animation. 1 is the normal playback speed.
خاصيةspeedMultiplier_The speed multiplier for this state.
خاصيةtagHash_The Tag of the State.
خاصيةloopIs the state looping.
خاصيةLengthCurrent duration of the state.

الدوال​

IsName​

bool IsName(string name)

Does name match the name of the active state in the statemachine?

المعاملات

الاسمالنوعالقيمة الافتراضية
namestring–

القيم المرجعة

bool

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
AnimationStateInfo.isName("aStateName")

IsTag​

bool IsTag(string tag)

Does tag match the tag of the active state in the statemachine.

المعاملات

الاسمالنوعالقيمة الافتراضية
tagstring–

القيم المرجعة

bool

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
AnimationStateInfo.isTag("aStateTag")

الخصائص​

fullPathHashللقراءة فقط​

int fullPathHash {get; }

The full path hash for this state. The hash is generated using Animator.StringToHash.

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
fullPathHash = AnimationStateInfo.fullPathHash

nameHashللقراءة فقط​

int nameHash {get; }

The hashed name of the State.

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
nameHash= AnimationStateInfo.nameHash

shortNameHashللقراءة فقط​

int shortNameHash {get; }

The hash is generated using SAnimator.StringToHash. The hash does not include the name of the parent layer.

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
shortNameHash= AnimationStateInfo.shortNameHash

normalizedTimeللقراءة فقط​

float normalizedTime {get; }

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.

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
normalizedTime= AnimationStateInfo.normalizedTime

lengthللقراءة فقط​

float length {get; }

Current duration of the state. In seconds Can vary when the State contains a Blend Tree.

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
length= AnimationStateInfo.length

speedللقراءة فقط​

float speed {get; }

The playback speed of the animation. 1 is the normal playback speed. A negative playback speed will play the animation from the end.

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
speed= AnimationStateInfo.speed

speedMultiplierللقراءة فقط​

float speedMultiplier {get; }

_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._

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
speedMultiplier= AnimationStateInfo.speedMultiplier

tagHashللقراءة فقط​

int tagHash {get; }

_The Tag of the State.

The hash is generated using SAnimator.StringToHash._

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
tagHash= AnimationStateInfo.tagHash

loopللقراءة فقط​

bool loop {get; }

Is the state looping. All animations in the state must be looping.

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
loop= AnimationStateInfo.loop

Lengthللقراءة فقط​

float Length {get; }

Current duration of the state. In seconds Can vary when the State contains a Blend Tree

مثال

Lua
AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
Length= AnimationStateInfo.Length