Promises for Unity

This package is my implementation of the promise / future pattern. Using promises makes the handling of asynchronous processes easier and clearer. You can use it to define what should happen if a async call was successful or failed with the easy then statement. For example, if you load a graphic and when it’s done you want to assign this graphic to a sprite. Also methods to create sequences, parallel processes or races are available. Since this can lead to a lot of usage this package has implemented a pool for the promise objects. In addition to that there is an option to collect reference-less promises to avoid the destruction from the garbage collector and put this object into the pool, called auto pooling. So you do not have to think of calling ReturnToPool method.

Features

  • solid promise pattern implementation
  • generic version of promise with stored result reference
  • promise object pooling
  • automatic pooling on reference loss
  • promise utils for sequences, races and parallel joins.

Manual

PromisesForUnity Manual – PDF

Store Link

View in Unity Asset Store