Unity错误:功能“输出变量声明”

bri*_*rst 4 c# game-development unity-game-engine

我将一个项目从一台计算机复制到另一台计算机,但是,当我启动Unity时,出现了很多错误,几乎都说同一件事。

在网上进行了调查,却一无所获。在我移动项目之前,Project在另一台计算机上运行良好。

D:/Unity Games/UYW/Library/PackageCache/com.unity.textmeshpro@2.0.0/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

不应该给出任何错误。

小智 10

For the error you provided:

转到Edit> Project Settings> Player,然后选择Other Settings选项卡,然后在Configuration块尝试切换Scripting Runtime Version.NET 4.x Equivalent

您也可以Assembly-CSharp.csproj使用文本编辑器进行编辑,并将行更改<LangVersion>4</LangVersion>为所需的C#版本,例如。<LangVersion>6</LangVersion>