The
- Unity 2017 option uses the new mono compiler, which supports. NET 4.6 and C # 6, while solving bugs while optimizing code.
- Unity 5 can use the Community Open source scenario: Https://bitbucket.org/alexzzzz/unity-c-5.0-and-6.0-integration/overview
- Trial in Unity 5.5.4:
-
csharp70support 3.2.3 (for Net 4.6)
failed to compile properly.
-
csharp70support 2.0.5
using Roslyn success:
- extract the
csharp70support
directory to the Asse The location where the TS
is tied.
- Import
csharp70support\csharp70support.unitypackage
.
- to restart unity.
- (optional) Create the
assets\csharpcompilerwrapper.rsp
file, adding the compilation options that are required for projects such as -unsafe
.
- (optional) Download the upgrade Roslyn version:
Roslyn 2.0.0.61501
, or replace the files in Csharp70support\roslyn
yourself.
- (optional) running
Csharp70support\ngen Install.cmd
can slightly improve compilation performance. The
- Rider supports this plugin and can be switched automatically. NET version.
- Unity 5.5.4 's own mono can also support C # 6, adding a line to the
mcs.rsp
file: -langversion:6
.
<wiz_tmp_tag id= "Wiz-table-range-border" contenteditable= "false" style= "Display:none;" >
Unity 5 uses the Roslyn compiler to support C # 7