Skip to content

General purpose task manager that provides a lot more control and power than a standard coroutine

Notifications You must be signed in to change notification settings

moto2002/P31TaskManager

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 (function that returns a boolean) you pass in each frame until you return false indicating the task is complete. For more complex tasks you can subclass P31AbstractTask for main thread tasks and P31AbstractBackgroundTask for background tasks. All non-background tasks can be paused, unpaused or cancelled (background tasks cannot be paused).

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.

About

General purpose task manager that provides a lot more control and power than a standard coroutine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%