P31TaskManager
P31TaskManager copied to clipboard
General purpose task manager that provides a lot more control and power than a standard coroutine
P31TaskManager for Unity
This is a lightweight task manager that lets you run a task either on the main thread (like a coroutine) or on a background thread. The general idea is for simple
tasks you can use the built in P31ActionTask which will tick any Func
A task is defined as anything that requires work. It could be as simple as a method that needs to be called each frame (similar to Update but with the ability to pause/unpause/cancel) or as complex as something that needs to run on a background thread.
Tasks can also be chained. Each task has a nextTask property that you can set with any other task. This allows you to perform a series of work with each step needing the result of the previous task or to simply sequence any tasks.