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 ウィンドウの違いは?
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.
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.