Unity-animator in-depth series---fullpathhash and Shortnamehash

Source: Internet
Author: User

Back to animator in-depth series Total catalogue

Unity5 improved the state hash and split it into Fullpathhash and shortnamehash, so let's see what the difference is.

Test results:

Fullpathhash supports nested nesting and layers, shortnamehash directly does not support paths

This is the test state machine used, altogether three states

Test script:

 Public classa1:monobehaviour{ PublicAnimator Animator; voidOngui () {Guilayout.box ("Layer1 Fullpathhash-"+ (animator. Getcurrentanimatorstateinfo (0). Fullpathhash = = Animator.stringtohash ("Layer1.idle"))); Guilayout.box ("Layer1 Idle2 Fullpathhash-"+ (animator. Getcurrentanimatorstateinfo (0). Fullpathhash = = Animator.stringtohash ("Layer1.Group.Idle"))); Guilayout.box ("Layer2 Fullpathhash-"+ (animator. Getcurrentanimatorstateinfo (1). Fullpathhash = = Animator.stringtohash ("Layer2.idle"))); Guilayout.box ("Layer1 Shortnamehash-"+ (animator. Getcurrentanimatorstateinfo (0). Shortnamehash = = Animator.stringtohash ("Idle"))); Guilayout.box ("Layer1 Idle2 Shortnamehash (1)-"+ (animator. Getcurrentanimatorstateinfo (0). Shortnamehash = = Animator.stringtohash ("Group.idle"))); Guilayout.box ("Layer1 Idle2 Shortnamehash (2)-"+ (animator. Getcurrentanimatorstateinfo (0). Shortnamehash = = Animator.stringtohash ("Idle"))); Guilayout.box ("Layer2 Shortnamehash-"+ (animator. Getcurrentanimatorstateinfo (1). Shortnamehash = = Animator.stringtohash ("Idle"))); }}
View Code

Test result 1 (Layer1.Group.Idle not jump):

Test Result 2 (Layer1.Group.Idle has been redirected):

Final conclusion:

Fullpathhash supports sub-states and tiers, Shortnamehash directly does not support paths

Unity-animator in-depth series---fullpathhash and Shortnamehash

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.