Animation を使用すると、Unity のアニメーションシステムを用いて、管理ステート間のそれぞれの遷移が 完全にアニメーション化されることを可能にします。これは、同時にアニメーションできるプロパティの数からして、遷移モードの中では最も強力なものです。
Animation 遷移モードを使用するためには、Animator コンポーネントをコントローラー要素にアタッチする必要があります。これは、“Auto Generate Animation” をクリックすることで自動的に実行されます。また、これにより設定済みの Animator Controller が生成されます。これは保存する必要があります。
新しい Animator Controller は、すぐに使用可能です。多くの Animator Controller とは異なり、このコントローラーはコントローラー遷移のためのアニメーションを保存し、望むのであればカスタマイズすることもできます。
たとえば、Animator コントローラーがアタッチされている Button 要素が選択されると、それぞれのボタンのステートに対するアニメーションは Animation ウィンドウを開く( Window>Animation )ことで編集できます。
任意のクリップを選択するための Animation Clip ポップアップメニューがあります。“Normal”、“Highlighted”、“Pressed”、“Disabled” から選択してください。
Normal State はボタン要素自身の値に設定され、空のままにすることができます。他のすべてのステートで最も一般的な設定はタイムラインの初めにキーフレームを一つおくというものです。ステート間の遷移アニメーションは Animator によって扱われます。
例として、Highlighted State のボタンの幅は、タイムラインの先頭に再生ヘッドを置いて Animation Clip のポップアップメニューから Highlighted を選択することで、以下のように変更できます。
再生モードに変更し、Highlighted 時にボタンがどう大きくなるかを見てください。
任意の数のプロパティをキーフレーム一つでパラメーター設定することができます。
いくつかのボタンは Animator Controller を共有することで同じ挙動を共有することができます。
UI アニメーション遷移モードは、Unity のレガシーアニメーションシステムと互換性がありません。 Animatorコンポーネントのみ利用可能です。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.