proyecto26 / RestClient

🦄 A Promise based REST and HTTP client for Unity 🎮
https://assetstore.unity.com/packages/slug/102501
MIT License
1.24k stars 175 forks source link

Update ExecuteOnMainThread.cs to work with newer versions of .NET #218

Open matronator opened 2 years ago

matronator commented 2 years ago

Remove #if NET_40 to make it work on newer versions of .NET.

maifeeulasad commented 2 years ago

Hey @matronator, really appreciate your effort toward this proyecto26-RestClient library and open source. A warm welcome from the proyecto26-RestClient team.

Now,

As per this official support thread, Unity supports Unity 2018.4 (LTS) and onward. And this thread is from 2021-05-04.

unity supported list

And as per this documentation:

... In Unity 2018.1, the .NET 4.x equivalent runtime is no longer considered experimental, while the older .NET 3.5 equivalent runtime is now considered to be the legacy version. And with the release of Unity 2018.3, Unity is projecting to make the upgraded scripting runtime the default selection, ...

So there remains a huge question, should we even support older versions?

Really eager to hear back your thoughts on this.

Thanks.

matronator commented 2 years ago

Hi, thanks for the welcome!

Hmm, didn't know that, I knew there's gotta be some reason for the #ifs to be there.

Well, what if instead of dropping support, we could just add additional #ifs for newer versions of .NET (though it'd be a bit cumbersome and had to be updated every time a new version comes along - though that shouldn't be too much often).

Alternatively, I don't suppose there is some way you can have multiple versions of the same package on the Unity Asset Store, is it? So you could have one version with the #if that supports the older versions of Unity and a second version without it for 2018.4 and later.