wiki.sine.space | sinespace

Difference between revisions of "Scripting/SAnimatorStateInfo"

From wiki.sine.space
Jump to: navigation, search
(Replaced content with "This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/sanimatorstateinfo")
 
Line 1: Line 1:
=Members=
+
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/sanimatorstateinfo
 
+
 
+
{{ScriptFunction|bool|isName|(string name)|Does name match the name of the active state in the statemachine?|5=<pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
AnimationStateInfo.isName("aStateName")</pre>}}
+
 
+
{{ScriptFunction|bool|isTag|(string tag)|Does tag match the tag of the active state in the statemachine.|5=<pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
AnimationStateInfo.isTag("aStateTag")</pre>}}
+
 
+
 
+
 
+
=Properties=
+
 
+
 
+
{{ScriptFunction|int|fullPathHash|{ get; }|The full path hash for this state. The hash is generated using Animator.StringToHash.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
fullPathHash = AnimationStateInfo.fullPathHash</pre>}}
+
 
+
{{ScriptFunction|int|nameHash|{ get; }|The hashed name of the State.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
nameHash= AnimationStateInfo.nameHash</pre>}}
+
 
+
{{ScriptFunction|int|shortNameHash|{ get; }|The hash is generated using SAnimator.StringToHash. The hash does not include the name of the parent layer.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
shortNameHash= AnimationStateInfo.shortNameHash</pre>}}
+
 
+
{{ScriptFunction|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.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
normalizedTime= AnimationStateInfo.normalizedTime</pre>}}
+
 
+
{{ScriptFunction|float|length|{ get; }|Current duration of the state. In seconds Can vary when the State contains a Blend Tree.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
length= AnimationStateInfo.length</pre>}}
+
 
+
{{ScriptFunction|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.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
speed= AnimationStateInfo.speed</pre>}}
+
 
+
{{ScriptFunction|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.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
speedMultiplier= AnimationStateInfo.speedMultiplier</pre>}}
+
 
+
{{ScriptFunction|int|tagHash|{ get; }|The Tag of the State.
+
 
+
The hash is generated using SAnimator.StringToHash.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
tagHash= AnimationStateInfo.tagHash</pre>}}
+
 
+
{{ScriptFunction|bool|loop|{ get; }|Is the state looping. All animations in the state must be looping.|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
loop= AnimationStateInfo.loop</pre>}}
+
 
+
{{ScriptFunction|float|Length|{ get; }|Current duration of the state. In seconds Can vary when the State contains a Blend Tree|5= <pre>AnimationStateInfo = Space.Host.ExecutingObject.Animator.GetCurrentAnimationStateInfo(0)
+
Length= AnimationStateInfo.Length</pre>}}
+
 
+
 
+
 
+
 
+
 
+
{{Scripting Navbox}}
+

Latest revision as of 07:43, 19 September 2022

This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/sanimatorstateinfo