アニメーターコントローラーを利用すると、キャラクターやオブジェクトのアニメーションクリップや関連するアニメーション遷移のセットを配置し管理できます。たいていの場合、複数のアニメーションを利用して、ゲーム内で特定の状況が起きたときにそれらを相互に切り替えて使用するのは普通のことです。例えば、スペースバーが押される度に歩きのアニメーションからジャンプのアニメーションへ切り替える、などです。ただし、単一のアニメーションクリップしかない場合でも、それをゲームオブジェクトに使用するためには、アニメーターコントローラーに配置する必要があります。
アニメーターコントローラーには、その中で使用されているアニメーションクリップへの参照があり、 ステートマシン を使用して、さまざまなアニメーションクリップやクリップ間の遷移を扱います。ステートマシンは、アニメーションクリップと遷移の一種のフローチャートとも、あるいは Unity に含まれるビジュアルプログラミング言語で書かれた簡単なプログラムとも考えることができます。ステートマシンに関する詳細はこちら を参照してください。
Animation ウィンドウを使ってゲームオブジェクトをアニメーション化し始めるとき、または、アニメーションクリップをゲームオブジェクトにアタッチするとき、Unity は自動的にアニメーターコントローラーを作成します。
アニメーターコントローラーを手動で作成するには、プロジェクトウィンドウを右クリックし、Create > Animator Controller をクリックします。
マウスのスクロールホイール、または同様の機能を使用して、Animator Controller ウィンドウをズームイン/ズームアウトします。
Animator Controller ウィンドウのアイテムにフォーカスを置くには、1 つまたは複数の状態を選択し (選択したいステートを囲む選択ボックスをクリックまたはドラッグ) して、F キーを押して選択したものをズームします。
アニメーションの状態すべてを Animator Controller ウィンドウにフィットさせるには A キーを押します。
Unity は選択したものを保ちます。A と F キーを押すと、選択したアニメーションの状態と Animator Controller 全体で切り替えすることができます。
再生モードでは、アニメーターがビューをパンして、再生中の現在の状態が常に表示されるようにします。 Animator Controller は、ベースレイヤーとサブステートマシンの独立したズームの要因に基づいて、ウィンドウが自動的にパンして、アクティブな状態を確実に表示します。
再生モード中のズームの変更は、以下の手順で行います。
Animator Controller は各状態がアクティベートされるときに、パンして表示します。
2017–08–30 公開ページ
Animator のズームは2017.3 で追加NewIn20173
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.