1
\$\begingroup\$

My Unity version was about a year out of date. After upgrading it to Unity 2019.1.5f1 through the Unity Hub, my project started throwing hundreds of errors. The most prominent one seemed to be:

Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification

How can I fix my project so that it runs again?

\$\endgroup\$
1
  • \$\begingroup\$ When asking about a compiler error, it's usually good practice to include a snippet of the code responsible for the error. \$\endgroup\$
    – DMGregory
    Commented Jun 10, 2019 at 0:23

1 Answer 1

2
\$\begingroup\$

Go to Edit > Project Settings > Player and change the Scripting Runtime Version to .NET 4.x Equivalent.

Restart Unity and the project should compile again, unless you have other errors as well.

enter image description here

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .