- C# 100%
Source: src/UniTask/Assets/Plugins/UniTask/ from upstream master branch License: MIT (Copyright (c) 2019 Yoshifumi Kawai / Cysharp, Inc.) No modifications to upstream source code. 156 source files across Runtime/ and Editor/ folders. Replaces at.kairoscope.thirdparty.unirx (deprecated). |
||
|---|---|---|
| Editor | ||
| Runtime | ||
| .gitignore | ||
| CHANGELOG.md | ||
| Editor.meta | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
| Runtime.meta | ||
UniTask (Kairoscope Package)
Version: 2.5.11 Source: Cysharp/UniTask License: MIT (Copyright (c) 2019 Yoshifumi Kawai / Cysharp, Inc.)
What is UniTask?
UniTask provides an efficient, zero-allocation async/await integration for Unity.
- Struct-based
UniTask<T>with custom AsyncMethodBuilder for zero allocation - All Unity AsyncOperations and Coroutines are awaitable
- PlayerLoop-based tasks (
UniTask.Yield,UniTask.Delay,UniTask.DelayFrame, etc.) - MonoBehaviour message events and uGUI events as awaitable/async-enumerable
- Runs on Unity's PlayerLoop — no threads, works on WebGL/WASM
- Asynchronous LINQ with Channel and AsyncReactiveProperty
- TaskTracker window for leak detection
- Works in runtime, editor, and unit tests
Why This Package Exists
This is a repackaged version of Cysharp's UniTask for use as a Kairoscope internal Unity UPM package. It replaces the deprecated UniRx library (at.kairoscope.thirdparty.unirx) across all KairoEngine packages.
Packages that depend on this
KairoEngine.Utilities— Timer.cs usesUniTask.Delay()for delayed callbacksKairoEngine.UI— UI Toolkit package uses async initializationKairoEngine.TerrainEngine— After refactor away from Core
Installation
Add to your Unity project's Packages/manifest.json:
{
"dependencies": {
"at.kairoscope.thirdparty.unitask": "https://forgejo.jamesperet.com/kairoengine/unitask.git"
}
}
Or via Unity Package Manager → Add package from git URL:
https://forgejo.jamesperet.com/kairoengine/unitask.git
Namespace
All types live under Cysharp.Threading.Tasks:
using Cysharp.Threading.Tasks;
async UniTaskVoid DoSomething() {
await UniTask.Delay(1000); // wait 1 second
Debug.Log("Done!");
}
Source
Source code and .meta files are unmodified from the upstream release v2.5.11. The .meta files preserve canonical GUIDs — this ensures that any project migrating from com.cysharp.unitask to this package retains valid serialized references (scenes, prefabs, assembly definitions). No patches applied. When upgrading, replace Runtime/ and Editor/ folders (including .meta files) with the latest upstream release.
Upgrading
To update to a newer version of UniTask:
- Check the latest release at https://github.com/Cysharp/UniTask/releases
- Replace the
Runtime/andEditor/folders (and their.metafiles) with the new version - Update the
versionfield inpackage.json - Commit and tag with the new version number