colyseus / colyseus-unity-sdk

⚔ Colyseus Multiplayer SDK for Unity
https://docs.colyseus.io/getting-started/unity-sdk/
MIT License
371 stars 102 forks source link

Fixing usage of deprecated UnityWebRequest methods #167

Closed bkcetinkaya closed 3 years ago

bkcetinkaya commented 3 years ago

ColyseusRequest.cs file uses two deprecated UnityWebRequest methods which are:

"UnityWebRequest.isHttpError" and "UnityWebRequest.isNetworkError"

bkcetinkaya commented 3 years ago

168

Vidski commented 3 years ago

UnityWebRequest.Result was added in 2020.1 https://docs.unity3d.com/2020.1/Documentation/ScriptReference/Networking.UnityWebRequest.Result.html

Edit: Information regarding Unity LTS plans https://unity3d.com/unity/qa/lts-releases

Vidski commented 3 years ago

Maybe adding Preprocessing Commands to support 2019.4 LTS would be a good addition to this PR.

Example:

#if UNITY_2020_1_OR_NEWER
#endif
endel commented 3 years ago

Thanks for the PR @kaancetinkayasf! I agree with @Vidski, the version 2019 is still widely used out there, so we'd like to keep supporting it while it is an LTS version from Unity.

If you can bring the preprocessing compilation flags suggested by @Vidski to this PR would be great!

Vidski commented 3 years ago

Seems to be a duplicate of https://github.com/colyseus/colyseus-unity3d/pull/142 @kaancetinkayasf @endel

Edit: and https://github.com/colyseus/colyseus-unity3d/pull/136

mitchLucid commented 3 years ago

New pull request with required updates made here: https://github.com/colyseus/colyseus-unity3d/pull/170