
0
Completed
Animator.shortNameHash
Hi,
I'm having trouble accessing Animator.shortNameHash method in Bolt.
The goal is to get the current animation state info like i'm doing it right now in a script below.
AnimatorStateInfo currentState = animator.GetCurrentAnimatorStateInfo (0);
if (currentState.shortNameHash == Animator.StringToHash ("Idle")) {
animStateInfo = "Idle";
}
I would appreciate any advice on how to do that in a Flow Graph and/or a solution.
BR,
I.B.
Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Customer support service by UserEcho
Must not have added the type is my guess. If you are on 2017.2, Goto Tools > Bolt > Unit Options Wizard. Set your name type, and in assemblies add UnityEngine.AnimationModule. Then in types, add Animator. Then you should be able to find it.
#Edit: Just saw another post to fix my answer.
Yes, adding AnimationModule (assembly) + AnimatorStateInfo (type) is the way to go.
I'll add AnimatorStateInfo to the default types in the next version and give it a pretty icon too.