こんにちは、エンジニアのオオバです。

What's new in Unity 5.5 - Unity

めでたく11月30日にUnity5.5.0f3がリリースされました。
Unity5.4.0が7月28日リリースなので約4ヶ月で正式マイナーバージョンが上がったことになります。

Unityの進化が早いです。

また、ほぼ同日にリリースされた公式日本語版ブログにもアップデート内容などがまとまっています。

UNITY 5.5がリリースされました! | Unity Blog

リリースノートと同時に見比べながらブログを読んでいたのですが、やはり細かいアップデートまでは言及されていないようなので、その辺も含めオオバが気になったモノをまとめていこうと思います。

目次

👉DOTweenの教科書を読んでUnityアニメーションをプログラミングしてみよう!

キャッシュサーバーにローカルキャッシュ機能追加

Editor: Option to run Cache Server locally for quick platform switching.

Cacheサーバーの設定から新たにLocalキャッシュが出来るようになっています。

Unity5.5.0リリースノート個人的に気になるモノまとめ_0

Switch Platformの初回キャッシュ生成時はこれまで通り時間はかかりますが、2度目からはローカルキャッシュを使用するので早くなると思われます。

検証結果 : かなり早くなりました。検証記事はコチラ↓↓
今すぐ設定すべきUnityキャッシュサーバーのローカルキャッシュは非常に有用だった件

リニアカラースペースサポート

Graphics: Linear color space is supported on Android with OpenGL ES 3.x and iOS with Metal.

AndroidはOpenGL ES3.x、iOSはMetalでリニアカラースペースがサポートされたようです。

LookDevエディタウィンドウ追加

Graphics: New (Preview) LookDev editor window for viewing & validating meshes and materials in various lighting environments.

Unity5.5.0リリースノート個人的に気になるモノまとめ_1

新しいLook Devビューウィンドウが追加されています。
触ってみた感じIBLの単体テストができそうです。

スプラッシュスクリーンツール追加

Graphics: Unity splash screen tools.

現状あまりカスタマイズできそうにありませんが、感覚的に使えそうなスプラッシュスクリーンツールです。
テラシュールさんの記事が詳しかったです。

【Unity】スプラッシュスクリーンがPersonal ライセンスでもカスタマイズ可能に - テラシュールブログ

Shurikenの大幅なパワーアップ

  • Particles: Added support for sending custom data to Particle System vertex Shaders.
  • Lights Module, for adding realtime lights to particles
  • Noise Module, for adding Curl Noise to Particle Movement
  • Trails Module, for rendering ribbonized trails behind particles
  • Particles: Added a new Shape Module option to rotate particles to face their initial direction of travel.

Shuriken(Particle System)がパワーアップしています。こちらは公式ブログを読んだほうが分かりやすいと思います。

Unity5.5.0リリースノート個人的に気になるモノまとめ_2

軽く触ってみましたがFF7のライフストリーム的なものがShurikenだけで作れました。(画像などのアセットは使用しておりません)

Particles: Gradients now support a fixed color mode, where no blending is performed. This is useful when users want to define a simple list of possible colors to be chosen from.

Unity5.5.0リリースノート個人的に気になるモノまとめ_3

グラデーションの合成モードに Fixed が追加されています。

Particles: Gravity Modifier can now be a curve over time.

Unity5.5.0リリースノート個人的に気になるモノまとめ_4

重力設定が定数以外のカーブなどが追加されました。とてもうれしい修正。

Particles: Improved the Particle System curve editor so that it now supports wrap modes, and improved selection and editing of keys.

Unity5.5.0リリースノート個人的に気になるモノまとめ_5

Shurikenの各モジュールのカーブがまともになりました。

Instantiate時の基準座標変更

Core: Using Object.Instantiate(Object, Transform) will now use the Object position as the local position by default. This is a change from the 5.4 behaviour, which used the Object position as world.

Instantiateした際に、今までワールドポジションを使用していたが、今後はローカルポジションがデフォルトになります。

エディタモード時のTime.deltaTime更新

Editor: Time.deltaTime now updates in the Editor for any script marked with [ExecuteInEditMode], or any MonoBehaviour that has runInEditMode set to true.

MonoBehaviourクラスに runInEditMode プロパティが実装され、ExecuteInEditModeお役御免になりそうです。わざわざクラスの頭に [ExecuteInEditMode] と定義しなくても動的に変更することが出来るようになりました。
Editor拡張を作る身としては嬉しいアップデートです。

また今までExecuteInEditMode時且つエディタモード時はTime.deltaTimeが更新されずずっと0だったと思いますが、コチラが更新されるようになりました。エディタモード時にアニメーション描画更新などを行う際に役立つのではないかと思います。

EditorJsonUtilityのアップデート

Scripting: EditorJsonUtility now serializes object references by assetGUID/fileID rather than InstanceID, making the serialized data stable across Editor sessions.

EditorJsonUtilityがInstanceIDではなくGUID, fileIDを参照してシリアル化するようになったようです。これによりデシリアライズ時のオブジェクト間の参照切れがなくなると思われます。

Unityエディタのさわり心地変更

Editor: Removed fading/lerping behaviour when dragging/docking views, for a cleaner and less visually confusing UI.

Unityエディタのさわり心地が大きく変わります。ウィンドウをドラッグ、ドックに入れようとした時に硬さを感じるようになりました。無駄なアニメーションを削除したパフォーマンス向上でしょうか。フロントエンドエンジニアとしては細かいですが気になる変更点でした。

シーンに変更取消機能がメニューに追加

Editor: Added 'Discard changes' in Scene context menu in the Hierarchy. This reloads selected modified Scenes from disk.

Unity5.5.0リリースノート個人的に気になるモノまとめ_6

ヒエラルキーのシーンのコンテキストメニューから Discard changesをクリックすると変更を戻せます。
ただ戻せるのは1つ前に保存した状態ですので、何かやらかした系で恩恵に預かることはまず無いと思います。こまめにバックアップしましょう。

Unityエディタで低解像度チェックが可能

Editor: The Game View now has the option to emulate low resolution for aspect ratios when on a retina monitor, using a checkbox at the top of the Aspect Ratio/Resolution menu. This update applied to macOS-only, because retina support is currently macOS-only.

macOS限定で低解像度状態をチェックできるようになりました。

Unity5.5.0リリースノート個人的に気になるモノまとめ_7

DrawMeshInstanced API追加

Graphics: Added Graphics.DrawMeshInstanced and CommandBuffer.DrawMeshInstanced API, allowing instanced draws without the overhead of creating thousands of renderers.

DrawMeshInstancedとCommandBufferにオーバーヘッドのないインスタンス化APIDrawMeshInstanced が追加されてます。

CommandBuffers周りの変更

Graphics: Command buffers attached to Lights are now visualised in the Inspector, and buttons have been added for removing each/all of them.

最近オオバの中で感度が高めのCommandBuffers周りの修正。※試せていません。後日試します。

GPUインスタンシングサポート拡大

Graphics: GPU Instancing: Added support for Android with OpenGL ES 3.0 or newer, and iOS/macOS with Metal. Note that instancing is disabled on Android devices with GLES3.0 Adreno GPUs.

GPUインスタンスタンシングが Adreno GPU以外のOpenGLES3.0以上のGPU搭載のAndroid、Metal搭載のiOS / macOSでサポートされました。Adreno頑張れ!

平行ライトの美しくなった影

Graphics: Improve shadows precision for large game worlds. Use reverse-float depth buffer for improved depth buffer precision on modern GPUs. Particularly improves directional light shadowing for large view distances.

影描画がきれいになったようです。

404 - Unity

※↑↑公式リリースページから画像をお借りしております。

ラインレンダラー, トレイルレンダラーのパワーアップ

  • Graphics: Improved Line/Trail Renderer handling of corners and gradients.
  • Graphics: Added a Texture Mode to the Line/Trail Renderers, to control whether the texture repeats or stretches.

ラインレンダラー、トレイルレンダラーのコーナーとグラデーションの操作が出来るようになったようです。
またTextureModeという項目が追加されたようです。

Unity5.4.1p4Unity5.5.0f3

Unity5.5.0リリースノート個人的に気になるモノまとめ_8

比べたバージョンが少し低いですが、色々と追加されているようです。

スタティックバッチの高速化

Graphics: Static batch rendering is now faster, and uses fewer draw calls in many cases.

スタティックバッチレンダリングが更に早くなり、ドローコール数が減ったようです。

IL2CPPの改善

IL2CPP: Reduce the binary size and build time for projects which make use of many C# attributes.

毎回描かれてありそうですが、今回のリリースでもIL2CPPの改善。
ビルド時のバイナリサイズとビルド時間が短縮したようです。

iOSとtvOSの静的ライブラリサイズが現象

iOS/tvOS: Significantly reduced the size of shipped static libraries.

静的ライブラリのサイズが減るとのこと。微々たるものかも知れいけどアプリサイズに多少良い影響があるのだろうか?(未検証)

非圧縮テクスチャフォーマット統一化

Graphics: The default uncompressed texture format is now RGBA32 on all platforms, and the default format for new Texture2D script API. Previously, ARGB32 was the default on some platforms, but RGBA32 is better because it needs less color channel re-ordering at Texture upload time.

全プラットフォームでRGBA32に統一されました。 ARGB32はデフォルトフォーマットとしては採用されないようになりました。

Unityエディタのバーにバージョン表記

Editor: Added Unity version to the main Unity Editor window title bar, making it easy to see which Unity version you currently have open.

Unity5.5.0リリースノート個人的に気になるモノまとめ_9

地味ですが、多バージョン同時に使用している人にとっては嬉しい修正です。

ドック改善

Editor: It is now possible to dock views to the tops of windows and other views. Previously only left, right and bottom were possible.

Unityエディタのウィンドウを移動させやすくなりました。
今までは上部へ移動させながらウィンドウを分割することはできませんでしたが、それが出来るようになりました。

Metalの書き出しの変更

Graphics: Metal: Switched the shader backend to HLSLcc. This is the same compiler used for OpenGL Core and ES3.0. Now it enables instancing, and soon compute shaders on Metal.

以前の状態は分かりませんが、HLSLccに変更されたようです。近々MetalでもCompute Shadersを可能にするそうです。

iOSのダッキング修正

iOS: Fixed audio ducking for iOS platform (background audio applications muting).

修正内容がよくわからないですが、iOSのダッキングに手が加わったようです。

PhysXのアップグレード

Physics: Physics engine updated from PhysX 3.3.1 to PhysX 3.3.3.

ReadLineのパフォーマンス向上

Scripting: Improved the performance of System.IO.StringReader.ReadLine.

文字列の行を読み取るReadLine関数の処理が早くなったとのこと。

StringReader.ReadLine メソッド (System.IO) | Microsoft Docs

JsonUtility.ToJsonの改善

Scripting: JsonUtility.ToJson is now faster and uses less temporary memory.

JsonUtilityToJsonメソッドは任意のオブジェクトをJsonテキストに書き出す関数です。使用時のスピードアップとより少ない一時メモリ使用になったとことです。

C#コンパイラアップグレード

Scripting: Upgraded C# compiler to Mono 4.4. The new compiler still targets C# 4 and .NET 3.5, but provides better performance and many bug fixes.

非常に気になる修正です。

Materialインスペクタ表示改善

Shaders: Added a Render Queue setting to the Material UI. Previously this was a script-only setting on the Material.

Unity5.5.0リリースノート個人的に気になるモノまとめ_10

今までMaterialのRenderQはスクリプトからの修正のみでしたが、UIから変更できるようになりました。地味に良い改善です。

気になるるエディタ拡張周りの変更

Editor: EditorGUIUtility.ObjectContent now adds type information to the text string as shown for ObjectFields. For example: "Concrete (Texture2D)" instead of "Concrete".
IMGUI: The Event.Use() function logs a warning if the event type is Repaint or Layout.

VR周り

Particles: Added a new Render mode to make particle billboards face the eye position. This is good for VR rendering.

パーティクルのビルボードを視点方向を向かせるレンダーモードがShurikenに追加されているようですが、、。

Unity5.5.0リリースノート個人的に気になるモノまとめ_11

エディタ見てもRenderModeにそれっぽいのがありませんでした。

その他気になるけど、よくわからなかった系

  • Graphics: Metal (iOS/macOS) can now render into slices of 3D and 2DArray Textures.
  • Profiler: User profile markers in scripts now show in platform-specific profiling tools even when the Unity profiler is not running.
  • Plugins: You can exclude specific platforms when "Any Platform" is selected. This allows you to set plug-in compatibilities on any platform except your selected specific platform. Added additional API to PluginImporter.
  • Serialization: Added new scripting class attribute 'PreferBinarySerialization' which allows developers to hint Unity that a ScriptableObject derived type prefers to use binary serialization regardless of project's asset serialization mode.
  • Serialization: The serialization depth limit warning now prints the serialization hierarchy that triggered the warning.
  • Editor: Area lights now indicate their effective range in the Inspector.
  • Editor: In SceneView, the wireframe is now hidden on objects with the hideInHierarchy flag. Previously it would still be visible when the object's parent was selected.

終わりに

リリースノートの量が多すぎて途中で力尽きる形になりましたが、個人的にはパワーアップされたShurikenで色々と遊んでみたいと思いました。

オススメ記事
検証環境