Version: 2021.3
言語: 日本語
アニメーション遷移
Playable API

アニメーションに関する FAQ

一般的な質問

Mecanim (メカニム)とは

Mecanim は Unity に統合されたアニメーションソフトウェアの名称です。Unity 4.x シリーズの早い段階から、Mecanim は特にヒト型キャラクターのアニメーション製作に主眼を置いており、そのための特徴的な機能を数多く備えています。Mecanim は Unity の旧アニメーションシステム(現在は legacy と呼ばれる)とは別物です。

Mecanim integrated humanoid animation retargeting, muscle control, and the state machine system. The name “Mecanim” comes from the French word “Mec” meaning “Guy”. Since Mecanim operated only with humanoid characters, our legacy animation system was still required for animating non-humanoid characters and other keyframe-based animation of GameObjects within Unity.

しかしそれ以降も、我々は、プロジェクトのあらゆる場面でのアニメーション製作に役立つような Mecanim の開発、拡張を続け、残りのアニメーションシステムとの統合を図ってきました。ここで “Mecanim” の不明瞭な定義は終わりを告げ、新たなアニメーションシステムが始まります。このような理由から、コミュニティやリファレンスドキュメントではまだ “Mecanim” の名称を目にしますが、現在では、それは単にメインのアニメーションシステムを意味しています。

Animation コンポーネントと Animator コンポーネントの違いは?

Animation コンポーネントは 旧アニメーションシステム で使用していた過去の仕組みです。後方互換性のために残してあるだけなので、新しいプロジェクトでは非推奨です。代わりに、最新の Animator コンポーネントを使ってください。

左: 旧システムの Animation コンポーネント。右: 現システムの Animator コンポーネント
左: 旧システムの “Animation” コンポーネント。右: 現システムの “Animator” コンポーネント

Animation ウィンドウと Animator ウィンドウの違いは?

The Animation Window allows you to create and edit animation clips within Unity. You can use it to animate almost every property that you can edit in the inspector, from a Game Object’s position, a material color, a light’s brightness, a sound’s volume, and even arbitrary values in your own scripts.

The Animator Window allows you to organize your existing animation clip assets into a flowchart-like system called a state machine.

この二つのウィンドウは新しいアニメーションシステムの一環であり、古いアニメーションシステムのものではありません。

つまり、Animation コンポーネントは古く、Animation ウィンドウは現在のもの、という事ですか?

そのとおりです。

旧アニメーションシステムを使用してプレイヤーのアニメーションを行っています。Mecanim を使用するべきでしょうか?

一般的には、使うべきでしょう。legacy アニメーションシステムは、過去の古いプロジェクトとの後方互換性のためだけに存在しており、現在のアニメーションシステムと比較すると、非常に限られた機能しかありません。ただ、過去のプロジェクトを古いシステムで作成する場合のみ、legacy アニメーションシステムの使用を検討するのもよいでしょう。

インポート

なぜインポートしたメッシュにアニメーターコンポーネントがついているのでしょうか?

When Unity detects that an imported file has animation in its timeline, it will add an animation component on import. You can modify this in the asset’s import settings by setting the “Animation Type” to None in the import settings under the Rig tab. If necessary you can do this with several files at once.

レイヤー

レイヤーの順番は何かに影響しますか?

はい。レイヤーは一番上から下まで順に評価されます。Override としてセットされたレイヤーは常に前にあるレイヤーを上書きします(マスクがあれば、そのマスクにもとづきます)。

Base Layer のウェイトは常に 1 とすべきでしょうか、あるいは別のレイヤーが実行されているときは 0 に設定すべきでしょうか。

Base Layer のウェイトは常に1で、オーバーライド レイヤーは完全に Base Layer を上書きします。

コントローラーから変数の値を文字列以外の形式で取得する方法はありますか?

整数型を使用してステートおよびパラメーターを識別することができます。Animator.StringToHash 関数を使用して整数型の識別子を取得してください。例えば:

runState = Animator.StringToHash("Base Layer.Run");
animator.SetBool(runState, false);

同期するレイヤーと同期元のレイヤーの長さが異なる場合、どうなりますか?

If layers are of different lengths, they will become unsynchronized. Enable the Timing option to force the timing of the states on the current layer, on the source layer.

アバターマスク

LeftFoot、RightFoot、LeftHand、RightHand 以外の AvatarIKGoals を作成する方法はありますか?

はい、膝と肘は IK をサポートしています。

どのボーンがアバターマスクの一部とするか定義する方法はありますでしょうか。

Yes, for Generic clips you can define which transform animation is imported or not. For Humanoid clips, all human transforms are always imported and extra transforms can be defined.

アニメーションカーブとイベント

カーブつきのアニメーションはアニメーションなしの場合とどのようにブレンドできますか?

When you have an animation with a curve and another animation without a curve, Unity will use the default value of the parameter connected to the curve to do blending. You can set default values for your parameters, so when blending takes place between a State that has a Curve Parameter and one that does not have one, it will blend between the curve value and the default parameter value. To set a default value for a Parameter, simply set its value in the Animator Tool window while not in LiveLink.

アニメーション遷移
Playable API
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961