Skip to content

Commit 86627de

Browse files
1.0.0-preview.2
# [1.0.0-preview.2](v1.0.0-preview.1...v1.0.0-preview.2) (2020-09-11) ### Reverts * Revert feat:
1 parent ad0b75d commit 86627de

File tree

3 files changed

+59
-3
lines changed

3 files changed

+59
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [1.0.0-preview.2](https://github.com/mob-sakai/CSharpCompilerSettingsForUnity/compare/v1.0.0-preview.1...v1.0.0-preview.2) (2020-09-11)
2+
3+
4+
### Reverts
5+
6+
* Revert "feat: support .Net 3.5" ([5f7cdec](https://github.com/mob-sakai/CSharpCompilerSettingsForUnity/commit/5f7cdecfd743a89c09f36ea3946576d4d93d9d2d))
7+
18
# 1.0.0-preview.1 (2020-09-11)
29

310

README.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ However, unfortunately, [there are no plans to backport to Unity 2020.1 or earli
4646
<br>
4747

4848
This 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
141141
The selected nuget package will be used for compilation.
142142
3. 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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "com.coffee.csharp-compiler-settings",
33
"displayName": "C# Compiler Settings",
44
"description": "Change the C# compiler (csc) used in your Unity project, as you like!",
5-
"version": "1.0.0-preview.1",
5+
"version": "1.0.0-preview.2",
66
"unity": "2018.3",
77
"license": "MIT",
88
"repository": {

0 commit comments

Comments
 (0)