- Home /
UnityEngine.AnimatorStateInfo.nameHash' is obsolete: "Use AnimatorStateInfo.fullPathHash instead."
I'm wondering if someone can help. I've recently upgraded to Unity 5 and have the following warning in my code and I'd like to change it in order to remove the warning. Below is the line of code that causes the error:
if (currentState.nameHash == Animator.StringToHash("Base Layer.Idle")) {
Basically I am trying to determine what layer the animator is on in order to trigger an event, I've been looking at the hashes that come out but I've been unable to find a matching string, is someone able to help using any of the other hashes available in the animator?
Comment
Your answer
Follow this Question
Related Questions
How to run String To Hash at compile time? 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Animator won't allow gameobjects with rigidbodies to move 0 Answers