Unity - Manual: C# compiler (unity3d.com)
Unsupported featuresC# 9.0
- Suppress emitting localsinit flag
- Covariant return types
- Module Initializers
- Extensible calling conventions for unmanaged function pointers
- Init only setters
If you try to use unsupported features in your project, compilation generates errors.
Record supportC# 9 init and record support comes with a few caveats.
- The typeย System.Runtime.CompilerServices.IsExternalInitย is required for full record support as it uses init only setters, but is only available in .NET 5 and later (which Unity doesnโt support). Users can work around this issue by declaring theย System.Runtime.CompilerServices.IsExternalInitย type in their own projects.
- You shouldnโt use C# records in serialized types because Unityโs serialization system doesnโt support C# records.
์ง๋ ฌํ ํ์
์๋ ๋ชป์ด๋ค๋ค
๊ทธ๋ฅ ์๋๋๊ฑฐ์๋
[field: SerializeField] ์ด๊ฑฐ ์ฐ๋ผ๋๊ฑด๊ฐ
์๋ ์ฑ์ ๊ธฐ์ ์ ๋์ ์ด ๋ฆ์
c# Span์ด 2021 ๋ผ์์ผ ๋ค์ด์ด ๊ฒ๋ค๊ฐ ์๋ ์ธ๊ฐ ์ฌ๋๋ ์ค์ด๊ณ ์ต์ ๋ฒ์ ๋ณด๋ฉด ์์ง ์์ฒด๊ฐ ๋ถ์์ ํด๋ณด์ฌ์ c# ๊ธฐ๋ฅ ์ ๊ฒฝ ์ธ ์ฌ์ ๊ฐ ๋๋ ์ถ์ ํ 2~3๋ ์ ๋ ์ง๋๋ฉด ์ถ๊ฐํด์ฃผ์ง ์์๊น