- Home /
Other
Unity 5 - nameHash obsolete? shortNameHash vs fullPathHash
So I updates all my nameHas to fullPathHash and now nothing works...did the convention change? And why is there no documentation explaining how to access sub state machines? And what is the difference between the shortNameHash and fullPathHash?
Before a state machine directly on the top layer would include the name of the layer:
var pickUpActorState : int = Animator.StringToHash("Base Layer.PickUpActor");
But anything that is nested on a child sub-machine state would not (go figure):
var carriedUpState : int = Animator.StringToHash("Carried.CarriedUp");
and I use several of these:
animController.anim.GetNextAnimatorStateInfo(0).nameHash == animController.fryPanttackIdleState
But replacing any of these with shortNameHash or fullPathHash, doesn't work anymore. I've also tried typing different combinations, with and without the layer name but without proper documentation this is just guess work.
Any help very appreciated.
http://docs.unity3d.com/ScriptReference/Experimental.Director.IAnimatorControllerPlayable.Play.html
The docs here say the following: stateNameHash The AnimatorState fullPathHash, nameHash or shortNameHash to play. Passing 0 will transition to self.