RestClient icon indicating copy to clipboard operation
RestClient copied to clipboard

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

Open matronator opened this issue 2 years ago • 2 comments

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

matronator avatar May 30 '22 00:05 matronator

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.

maifeeulasad avatar May 30 '22 14:05 maifeeulasad

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.

matronator avatar May 30 '22 23:05 matronator