(Case 1142289) TextMesh Pro: Feature `out variable declaration' cannot be used

EDIT: Here is the link to the solution:

I opened my 2019.1.0b4 project in Unity 2019.1.0b9 and TextMesh Pro was throwing the following errors:
Error Messages

Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs(24,45): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs(59,45): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs(94,45): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/FastAction.cs(129,45): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/MaterialReferenceManager.cs(585,74): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/MaterialReferenceManager.cs(621,74): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(408,82): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(408,99): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(638,69): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(771,60): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(986,51): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1081,238): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1098,83): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1131,53): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1222,238): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1241,83): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1306,209): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1458,209): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1876,82): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_FontAsset.cs(1880,83): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_InputField.cs(1561,148): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_InputField.cs(1607,139): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_InputField.cs(1682,152): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_MaterialManager.cs(368,58): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_MaterialManager.cs(428,68): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_MaterialManager.cs(430,62): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_MaterialManager.cs(450,68): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_MaterialManager.cs(452,62): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_MaterialManager.cs(501,70): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_MaterialManager.cs(503,62): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_SpriteAnimator.cs(48,65): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_SpriteAsset.cs(170,68): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_SpriteAsset.cs(188,56): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_SpriteAsset.cs(205,58): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_StyleSheet.cs(72,61): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(1948,75): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2060,75): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2170,75): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2252,75): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2417,75): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2561,75): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2633,80): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2703,80): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2773,80): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2843,80): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2911,80): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(2979,80): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(3047,80): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(3114,80): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(3812,73): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(3945,130): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(3958,130): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(5446,177): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(5446,214): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(5458,179): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(5458,216): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_Text.cs(5919,66): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMP_TextUtilities.cs(2039,100): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMPro_Private.cs(1019,59): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMPro_Private.cs(1751,73): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMPro_Private.cs(1903,130): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMPro_Private.cs(1916,130): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMPro_UGUI_Private.cs(1089,59): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMPro_UGUI_Private.cs(1865,73): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification
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
Library/PackageCache/com.unity.textmeshpro@2.0.0/Scripts/Runtime/TMPro_UGUI_Private.cs(2041,130): error CS1644: Feature `out variable declaration' cannot be used because it is not part of the C# 4.0 language specification

Screenshot

Lucky for me, I don’t use TextMesh Pro in this project, so I was able to simply remove the package and the error vanished.

1 Like

I’ve had some issues with TMP not handling updates very well - it seems like it’s not getting recompiled properly after upgrading the Unity version. Deleting it’s folder in Library/PackageCache has fixed the issue. Just selecting it and reimporting hasn’t.

4 Likes

I tried that, didn’t fix the issue here.

Same issue, Did you figure anything out?

Nope. QA replied with “Change Scripting Runtime Version to .NET 4.x” and closed the issue. Not sure if that’s the proper solution though, since this issue did not exist in 2019.1.0b4. Something did change between b4 and b9 which now causes this issue.

However, I did what I could do to make Unity aware that there seems to be an issue. If they believe the solution is to switch to .NET 4.x, then fine ¯_(ツ)_/¯

5 Likes

How does one “Change ScriptingBackend to .NET 4.x”?

2 Likes

Edit > Project Settings > Player > Other Settings > Scripting Runtime Version

Update: Unity Technologies created a Sticky Note regarding this issue:
https://discussions.unity.com/t/739827

25 Likes

This solved the issue for me :slight_smile: Thank you !

4 Likes

Edit > Project Settings > Player > Other Settings > Scripting Runtime Version

that fixed it for me in 2019.1 full release. It was set to 3.5(depreciated). You’d think with just 2 settings (and 1 of them not being good), unity would have just changed it for you. Oh well.

2 Likes

Can confirm, Peter77’s solution worked for me too

1 Like

I upgraded from the 2017 version to the 2019 release, can also confirm that Peter77’s solution worked for me too.
Thanks for also posting how to change the Scripting Runtime Version :slight_smile:

1 Like

This was an issue for me too, and about had me going crazy, until I found this thread, so just wanted to say this worked for me too. Changed to 4.x and all 72 errors went away and the project runs just fine!

1 Like

Confirmed again, just migrated a project from Unity2017 and TMPro 1.x to 2019.1 and TMPro version. all compile error messages gone, have a ton of null pointer reference exceptions, but that may be due to editor values not being carried over

You sir, saved my life.

Thanks SO much Peter77! I’m been trying to figure out how to fix this for the longest time — the solution ended up being incredibly simple!

1 Like

Switching to .NET 4.x fixes the TextMesh Pro error, but induces errors in other packages I’m using. I wish there was a solution that doesn’t require upgrading to .NET 4.x. For now, I have to regularly go back into the
Library/PackageCache/ and delete com.unity.textmeshpro@2.0.0 to get my code working again…

It works for me as well. In the package manager, TextMeshPro requires .NET 4.x now. Thanks, dude!