Anyone know how to update C# version in the unity because only C# version 6 or later can use the property initializer. And now I use Visual Studio instead of monobehavior so Thank You in advance!
If you have Unity 2017, you can change the runtime to one that supports c# 6. Go to edit->project settings->player settings->other settings->Scripting runtime version, and select "Experimental (.NET 4.6 Equivalent).
1 Like
Wow! It works Much appreciate!!!
Is there any problem of changing this and why don’t unity set runtime version to .NET 4.6 as the default instead of the old one?
Because it’s very new, so they’re not quite confident that it works yet. That’s what “Experimental” means.
It seems to make the editor a bit more unstable (ie. more prone to crashing), but I’m assuming that’s going to get ironed out soon.
1 Like