benjaminhate / SNet

Multiplayer layer for Unity - Client/Server based on ENet
7 stars 3 forks source link

Update to Unity 2020.1 or above #6

Open ActiveCG opened 3 years ago

ActiveCG commented 3 years ago

Loaded up this library in Unity. Looks great but am getting lots of errors in the scripts Any chance that you can update it for 2020.1. Think it great now that UNET is not available

These are some the errors (there around 12 errors all in all)

Assets/SNet/Core/Common/Enumeration.cs(102,71): error CS1519: Unexpected symbol `throw' in class, struct, or interface member declaration.

Assets/SNet/Core/Common/Enumeration.cs(102,99): error CS1525: Unexpected symbol `Invalid cast.'

Assets/SNet/Core/Common/Enumeration.cs(102,77): error CS0106: The modifier `new' is not valid for this item.

Assets/SNet/Core/Common/Enumeration.cs(102,77): error CS1520: Class, struct, or interface method must have a return type

Assets/SNet/Core/Common/Enumeration.cs(186,61): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification

Assets/SNet/Core/Common/Extensions/CommonExtensions.cs(20,56): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification

Assets/SNet/Core/Models/Network/ClientNetwork.cs(62,43): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification

Assets/SNet/Core/Models/Network/ServerNetwork.cs(73,47): error CS1644: Feature `declaration expression' cannot be used because it is not part of the C# 6.0 language specification

benjaminhate commented 3 years ago

Thank you for you interest in my package. You must know it is still Work In Progress by that time.

I am looking into the 2020.1 compatibility. If I manage to make it work, I'll put a branch called '2020.1' for you to work on it.

benjaminhate commented 3 years ago

I loaded the project with Unity 2020.1.17f1 and I didn't have any issues. Maybe it will correct itself with a reload from your side ? Or maybe you can change the API Compatibility Level in Edit > Project Settings > Player > Other Settings

ActiveCG commented 3 years ago

Hey Thanks, Hit me up when you have something. :) I will try again to see if i can load the project as is in 2020.1