TechAssembly/ruven

Fix one of Colyseus' dependencies breaking when targeting .NET 4

gioragutt opened this issue · 1 comments

When changing the runtime to .Net 4.0 in Edit -> Project Settings -> Player -> Other Settings -> Configuration,

The following code breaks:

/Users/giorag/Git/ruven/client/Assets/ColyseusClient.cs(3,3): Error CS8025: Feature 'null propagating operator' is not available in C# 4. Please use language version 6 or greater. (CS8025) (Assembly-CSharp)
/Users/giorag/Git/ruven/client/Assets/ColyseusClient.cs(3,3): Error CS8025: Feature 'null propagating operator' is not available in C# 4. Please use language version 6 or greater. (CS8025) (Assembly-CSharp)

Moving to .Net 4.0 is important because (a) .Net 3.5 has been deprecated, and (b) we want to be able to use newer C# features.

I will open an issue in colyseus/unity-3d to maybe get help from them.
In the meanwhile, if you (whoever takes this issue) knows how to fix this - go for it!

The missing piece was to change the backwards API compatibility from 2.0 to 4.0 as well. Gj Chen.