[Solved] Unity3D: error CS1644: Feature `out variable declaration’ cannot be used because it is not part of the C# 4.0 language specification

Good old Unity error CS1644. Unity has hundreds if not thousands of error codes and if we were to write about all of them, we’d never have time to write about the fun stuff.  Still, if you’re just starting out with Unity, it is completely normal to regularly have to face little errors and hurdles that will stop you from moving forward and getting into the fun game development stuff.  Yes, Unity‘s the learning curve can be steep but learning is what this is all about.

Problem – What triggered error CS1644?

Our latest mini roadblock came in the form of the error that you see below. This error was triggered while importing an older project into a newer version of Unity3D via the Unity Hub. The error itself may seem a little vague but once you decode it, it’s not that scary and the solution to this error is actually very simple.

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

If you read through the error, we see that it is due to an incorrect or deprecated scripting runtime version of .NET in the Project Settings and while your error may refer to a different ‘Feature’, the actual cause of the error is the same.

Solution or How to resolve error CS1644:

From the Unity menu, navigate to Edit -> Project Settings -> Player -> Other

Once you’re there, change the following:

a) Scripting Runtime Version from 3.5 to .NET 4.x Equivalent
b) Api Compatibility Level from .NET Standard 2.0 to .NET 4.x

Finally, you’ll then need to close down your project and restart Unity and you should now be able to launch and run your project. Enjoy!

One thought on “[Solved] Unity3D: error CS1644: Feature `out variable declaration’ cannot be used because it is not part of the C# 4.0 language specification

  1. lo resolvi pero ahora me sale con el c# 6.0 este es el error : Assets/Mirror/Runtime/Transport/KCP/kcp2k/highlevel/KcpConnection.cs(256,41): error CS1644: Feature `out variable declaration’ cannot be used because it is not part of the C# 6.0 language specification

    que hago??, agradeceria su respuesta.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.