Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity Error: Feature 'out variable declaration'

I copied a project from one computer to another, however, when I started Unity I got tons of errors all saying practically the same thing.

Researched online and found nothing. Project worked perfectly fine on a different computer before I moved it.

D:/Unity Games/UYW/Library/PackageCache/[email protected]/Scripts/Runtime/TMPro_UGUI_Private.cs(2028,130): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification

Shouldn't give any errors.

like image 808
briankirst Avatar asked May 09 '19 22:05

briankirst


1 Answers

For the error you provided:

Go to Edit>Project Settings>Player, then select Other Settings tab and in Configuration block try switching Scripting Runtime Version to .NET 4.x Equivalent.

You can also edit Assembly-CSharp.csproj with text editor and change line <LangVersion>4</LangVersion> to required C# version, ex. <LangVersion>6</LangVersion>

like image 145
Voodu Avatar answered Oct 19 '22 05:10

Voodu