Unity 5.5.2f1 to 5.6.1f1 - interpolated strings error?

后端 未结 3 957
逝去的感伤
逝去的感伤 2021-01-12 20:51

I\'ve just updated my Unity version from 5.5.2f1 to 5.6.1f1. Suddenly I get the error:

Feature `interpolated strings\' cannot be used because it is n

3条回答
  •  -上瘾入骨i
    2021-01-12 21:39

    In Unity 2017 it's now possible to use interpolated strings in Unity if you change the .NET version that Unity uses. Interpolated strings is a feature from C# 6 which is released in .NET 4.6.

    To change to .NET 4.6 go to: Edit > Project Settings > Player, expand "Other settings" and change the "Scripting Runtime Version" to .NET 4.6

    For more info look at: https://docs.unity3d.com/Manual/ScriptingRuntimeUpgrade.html

    In Unity 2018, Unity should use .NET 4.x by default so you should have access to interpolated strings without having to change anything.

提交回复
热议问题