Skip to content

ActuatorDigital/Async.Routines

Repository files navigation

Async.Routines

Implements AIR's IAsync interface in front of a Unity Coroutine.

Features

Provides a mechanism for scheduling a Unity Coroutine at runtime without the need of an owning MonoBehaviour and returns an IAsync allowing followup actions via .Then.

Basic Usage

Then usage is unchanged from the underlying Async. Creating an AsyncRoutine simply requires:

var asyncRoutine = new AsyncRoutine(MultiFrameCoroutine());
asyncRoutine.Then(() => Notification.Information("Process Complete."))

public IEnumerator MultiFrameCoroutine()
{
    //some
    yield return new WaitForEndOfFrame();

    //multi frame
    yield return new WaitForSeconds(1);

    //process
    yield return null;
}

Installation

Add to unity via the package manager. Use add git package with https://github.com/AnImaginedReality/Async.Routines.git.

About

No description, website, or topics provided.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages