@@ -46,7 +46,7 @@ However, unfortunately, [there are no plans to backport to Unity 2020.1 or earli
4646<br >
4747
4848This package changes the C# compiler (csc) used in your Unity project, to support C# 8.0.
49- Let's enjoy C# 8.0 features with Unity project!
49+ Let's enjoy C# 8.0 features with your Unity project!
5050
5151![ ] ( https://user-images.githubusercontent.com/12690315/92738843-44611800-f3b7-11ea-9412-be528547d0dd.png )
5252
@@ -78,7 +78,6 @@ Let's enjoy C# 8.0 features with Unity project!
7878* Modify ` langversion ` property in * .csproj file
7979* ` dotnet ` is not required.
8080* ` Use Default Compiler ` option to disable this plugin.
81- * Support ` .Net 3.5 ` and ` .Net 4.x `
8281
8382[ OpenSesame.Net.Compilers ] : https://www.nuget.org/packages/OpenSesame.Net.Compilers
8483[ Microsoft.Net.Compilers ] : https://www.nuget.org/packages/Microsoft.Net.Compilers
@@ -103,6 +102,7 @@ https://forum.unity.com/threads/unity-c-8-support.663757/page-2#post-5738029
103102#### Requirement
104103
105104* Unity 2018.3 or later
105+ * ` .Net Framework 4.x `
106106
107107#### via OpenUPM
108108
@@ -141,6 +141,55 @@ Or, use [UpmGitExtension](https://github.com/mob-sakai/UpmGitExtension) to insta
141141The selected nuget package will be used for compilation.
1421423 . Enjoy!
143143
144+ ### Settings asset
145+
146+ A project setting asset for C# Compiler will be saved in ` ProjectSettings/CSharpCompilerSettings.asset ` .
147+
148+ ``` json
149+ {
150+ "m_UseDefaultCompiler" : false ,
151+ "m_PackageName" : " Microsoft.Net.Compilers" ,
152+ "m_PackageVersion" : " 3.5.0" ,
153+ "m_LanguageVersion" : 2147483647
154+ }
155+ ```
156+
157+ ### For C# 8.0 features (preview)
158+
159+ [ C# 8.0 features] ( https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8 )
160+ [ sample] ( https://github.com/mob-sakai/CSharpCompilerSettingsForUnity/tree/develop/Assets/C%23%208.0%20Features )
161+
162+ If you want to use the C# 8.0 features, set it up as follows:
163+
164+ * Package Name: ** Microsoft.Net.Compilers**
165+ * Package Version: ** 3.5.0** or later
166+ * Language Version: ** latest** or ` CSharp_8 `
167+
168+ Some features required external library.
169+
170+ * Async stream -> [ UniTask v2] ( https://github.com/Cysharp/UniTask )
171+ * Install to project.
172+ * Indices and ranges -> [ IndexRange] ( https://www.nuget.org/packages/IndexRange/ )
173+ * Download nuget package and extract it.
174+ * Import ` lib/netstandard2.0/IndexRange.dll ` to project.
175+ * Stackalloc in nested expressions -> [ System.Memory] ( https://www.nuget.org/packages/System.Memory/ )
176+ * Download nuget package and extract it.
177+ * Import ` lib/netstandard2.0/System.Memory.dll ` to project.
178+
179+ ** NOTE:** Default interface methods feature is not available. It requires ` .Net Standard 2.1 ` .
180+
181+ ### For C# 9.0 features (preview)
182+
183+ [ C# 9.0 features] ( https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9 )
184+ [ sample] ( https://github.com/mob-sakai/CSharpCompilerSettingsForUnity/tree/develop/Assets/C%23%209.0%20Features )
185+
186+ If you want to use the C# 9.0 features, set it up as follows:
187+
188+ * Package Name: ** Microsoft.Net.Compilers**
189+ * Package Version: ** 3.8.0-2.final** or later
190+ * Language Version: ** preview**
191+
192+ ** NOTE:** Some features is not available. It requires ` .Net 5 ` .
144193
145194<br ><br ><br ><br >
146195
0 commit comments