2017.1 では、.NET 4.6 を、プロジェクトごとに選択できる実験的なオプションとして使用できます。GUI では、このオプションは Player Settings で Scripting Backend と Api Compatibility Level の上に表示されます。
同等のスクリプティング API は PlayerSettings.scriptingRuntimeVersion プロパティーです。この設定を変更するにはエディターを再起動する必要があります。なぜなら、この変更はプレイヤー同様にエディターにも影響するからです。
デフォルトでは、Unity の挙動や .NET 機能は何も変わりません。任意のプロジェクトに対し新しい .NET 4.6 を選択すると、C#6、.NET 4.6 クラスライブラリ、新しいランタイム機能をユーザースクリプトや事前コンパイルされたアセンブリで使用できるようになります。
すべてのプラットフォームに使用できますが、それぞれ違いがあります。
エディターとスタンドアロンでは、このオプションを有効にすると新しいバージョンの Mono が使われます。
すべてのコンソールプラットフォームでは、新しい .NET バージョンを適用すると IL2CPP だけしか使えません。
iOS と WebGL では、IL2CPP だけしか使用できません。
Android では引き続き Mono と IL2CPP がサポートされます。
その他のプラットフォームでは、新しい Mono か IL2CPP どちらかをサポートするように開発中です。
2017.1b4 バージョンでは、このオプションはデスクトップ、 iOS、Android だけで使用して下さい。他のプラットフォームに対するサポートは、まだ完成していません。
IL2CPPは、新しい.NET 4.6 API とその機能を完全にサポートしています。
新しいMono / IL2CPP は Unity の内部的な自動テストをパスしました。もちろん、まだ、使用中に問題が発生することが予想されます。もし問題が発生した場合は、それをレポートしてください。
いいえ。ここでは、クラスライブラリとランタイムのアップグレードです。ただし、まだ Boehm GC が使われています。IL2CPP とともに使用する新しいバージョンの Boehm を適用しています (そのため IL2CPP と Mono にまったく同じ GC が使用されています)。
新しい Mono ガベージコレクタ (SGen) を使うには、Unity でさらに開発が必要とされます。新しいランタイムとクラスライブラリを安定させてから、その作業を進めます。
新しい Mono には VSTU 3.1 が必要です。Windows で新しい Mono ランタイムを使うには、 VSTU 3.1 をインストールして下さい。
MonoDevelop は現在、新しい Mono ランタイムをデバッグできません。ただし、現在この問題を修正しようと努力しています。
.NET 4.6 クラスライブラリは、現在使っている .NET 3.5 クラスライブラリよりもかなり大きいものです。Unity は、マネージリンカーを向上させ、もっとサイズを減らせるように開発中です。
さらに、以下のような新しい Unity 特有のクラスライブラリ API プロファイル (現在の Unity プロファイルに類似) を開発中です。
a) 特に AOT プラットフォームで使用できるよう装備されています。
b) API プロファイルを最小限に保ち、内部でストリップ/リンクできるように設計されています。
c) netstandard 2.0 (まだ、正式にはリリースされていません) をサポートします。
問題をレポートしてください。できるだけ早く、それらを修正します。
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.