UniTask icon indicating copy to clipboard operation
UniTask copied to clipboard

[Question] Any Plans for a NuGet version?

Open RichardWepner opened this issue 7 months ago • 1 comments

UniTask is designed to be used with Unity, so many of the features wouldn't be useful/present outside of Unity.

I'm working on a network-library where a user should be able to later on build a regular C# application instead of a Unity build for the server (in case the game logic is implemented in a compatible way). Recently I added optional UniTask support (i.e. if UniTask is present it is used instead of Tasks). To achieve this, I added a check for the corresponding #define and use either the one or the other type (in many cases with using).

If there is no non-Unity version of the library available, any user of this library would either need to use regular Tasks, or potentially need to add the same #define checks in their own code, which wouldn't be nice.

So my question would be: are there plans for a version of UniTask for non-Unity versions?

With the other libraries like ZLinq, the base is available on NuGet and the Unity specific extensions as a Unity package. For this one, since it's so far fully available as a package, adjusting the structure this way would be a breaking change since at least the distribution would change (people would need to add NuGetForUnity, which they might not have done yet, and install the base package) and the design might need to change as well (UniTask contains afaik Unity specific methods). I guess for UniTask it would be an option to release a "slimmed down" version that only contains the non-Unity code on NuGet.

It of course is still possible that I'm overlooking something which causes this to be not possible after all. =/

RichardWepner avatar Jun 08 '25 12:06 RichardWepner

In R3, the successor to UniRx, we made major changes and turned it into a hybrid with a NuGet version. I personally think this change was successful, and we've been following a similar approach since then (ZLinq is the same way). I would like to do the same with UniTask in the future, but since it would be a major update, it's not currently a high priority.

neuecc avatar Jun 18 '25 00:06 neuecc