ここでは、Unity の以前のバージョンからアップグレードするときに、既存のプロジェクトに影響を与える可能性のある Unity 2018.3 の変更点を列挙します。
flex-grow
、flex-shrink
、flex-basis
を表す最大 3 つのパラメーターを受け入れるようになりました。flex-shrink と flex-basis パラメーターはオプショナルです。省略すると、flex-basis のデフォルトは 0 になり、flex-shrink のデフォルトは 1 になります。flex: N
は flex N 0 auto
と同等でした。これは現在 flex:N 1 0
と同等にすることで CSS 標準に準ずるにようになりました。古いセマンティックを維持するには、USS ファイル内のすべての flex: N
ディレクティブを flex: N 0 auto
に置き換える必要があります。新しいバージョンでは、物理的な動作が変更され、一部のプロジェクトでは動作が異なる場合があります。特に以下の点に注意してください。
プロジェクトを 2018.2 以前から 2018.3b に移行し、それに Unity の GitHub リポジトリから取得した NavMesh コンポーネントを使用する場合は、この ブランチ を使用する必要があります。
Unity 2018.3 にはパーティクルのバグ修正がいくつか含まれており、これは以前のバージョンで作成されたプロジェクトに影響を与える可能性があります。
2018.3 より前では、Unity エディターはプロジェクト内の C# ファイルをコンパイルするときに Mono C# コンパイラー (mcs) を使用していました。 2018.3 以降、Roslyn C# コンパイラー (csc) が、新しいスクリプトランタイム (.NET 4.x と同等) を対象としたプロジェクトに使用されています。 Roslyn へ切り替えると、挙動が異なる場合があります。
csc.rsp
という名前にします。詳細は プラットフォーム依存コンパイル を参照してください。UnityScript (.js) と Boo (.boo) スクリプトファイルは、エディタでーコンパイルできなくなりました。
詳細は、2017 年 8 月の ブログ (英語) を参照してください。Unityscript2csharp ツールを使用して UnityScript を C# に変換できます。
Animator Root Motion playback has changed slighly to correct some inconsistencies when authoring Root Motion Animations in the Animation Window.
Case | Generated Root Motion | Animator.applyRootMotion | 2018.2 | 2018.3 |
---|---|---|---|---|
A | yes | yes | Apply Root Motion cumulatively on Root Transform. | Same as 2018.2 |
B | no | no | Apply Position, Rotation and Scale curves as authored in the AnimationClip. | Same as 2018.2 |
C* | yes | no | No root transform movement | Apply Position, Rotation and Scale as authored in the AnimationClip. |
D* | no | yes | No root transform movement | Apply Root Motion cumulatively on Root. |
For cases C and D, to achieve the same result in 2018.3, you need to implement OnAnimatorMove, then discard Animator.deltaPosition
and Animator.deltaRotation
in cases where you don’t want to apply Root Motion.
If your Project uses applyRootMotion
to “mute” Position, Rotation and Scale Animation on your Root Transform, then you need to override the Root Transform properties manually.