MugHead Studios
Menu
SubRoutines key art listing Always, Wait, When, RunFor, While and Chain

About this asset

SubRoutines run background tasks based on specific conditions, can be paused and chained for flexibility, and serve as a customizable event system in games and other applications.

The API covers While, Always, When, Wait, RunFor, Repeat, Chain, GetInstance, RemoveSubRoutine and RemoveAllSubRoutines.

Features

  • While, Always, When, Wait, RunFor, Repeat and Chain
  • GetInstance, RemoveSubRoutine and RemoveAllSubRoutines
  • Pause a running routine, and chain routines so one waits for the next
  • Do, RunNextFrame, RunAfterXFrames and RunForXFrames for frame-level timing
  • A customisable event system for games and other applications

Compatibility

Unity 2019.4 or newer. Works with the Built-in Render Pipeline, URP and HDRP.

Tags

  • subroutines
  • events
  • utilities
  • scripting
  • background