Mecanim on Unity 4.3 実例による新機能の紹介
- 11. Coding
Animator animator;
!
void Awake() {
animator = GetComponent<Animator>();
}
!
void Update() {
if (Input.GetKey(KeyCode.RightArrow)) {
animator.SetInteger("Action", 3);
} else {
animator.SetInteger("Action", 0);
}
}
- 16. New in Unity 4.3
•
Trigger(自動でfalseになるbool値)の追加
→AnyStateループからの解放
•
Play / CrossFadeメソッドの追加
→Transition地獄からの解放
Mecanimはようやく実用的に