Sub Routines View on Asset Store (opens in new tab)

Package details

Latest version
1.1.0
Last updated
First released
Unity version
2019.4.39 or later
Package size
301 KB
Files
12
Favorites
13
Views in the past week
15

Price tracking

Last checked
Tracked since
Lowest recorded
$4.99 on

Keywords

Sub Routines

by MugHead Studios (opens in new tab)

5.0 / 5 · 4 ratings

Ratings by stars
Number of ratings for each star rating
5 stars 4
4 stars 0
3 stars 0
2 stars 0
1 star 0

Little background tasks for Unity. Wait, repeat, run for a while, or chain steps together, all in one line each.

Price $4.99

Buy on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for Sub Routines, 6 months Current $4.99; lowest $4.99; highest $4.99 in this period. $0 $2.5 $5 Jun Jul Aug Sep Oct Nov Version 1.1.0 released 5 Nov 2026 v1.1.0

Asset preview

1 / 9

Sub Routines screenshot 1

Sub Routines screenshot 1

About this asset

Sub Routines is a small tool we wrote because we got tired of writing the same coroutines over and over.

Each sub routine is just a condition and an action. We check it once a frame for you, so things like "wait two seconds, then do this" or "fade this in over half a second" become a single line. You can also pause them and chain them together, so a sequence of steps reads top to bottom, the way you'd describe it out loud.

using MugHeadStudios;

SubRoutines.Chain(

SubRoutines.RunFor(0.5f, t => panel.alpha = t),

SubRoutines.Wait(2f, () => label.text = "Ready?"),

SubRoutines.Do(() => StartRound())

);

What's in it

  • Wait, When, While, Always, RunFor, Repeat
  • Frame-based helpers: RunNextFrame, RunAfterXFrames, RunForXFrames
  • Chain, to run sub routines one after another (chains can be nested)
  • Pause, resume, or remove any sub routine
  • No MonoBehaviour or StartCoroutine needed, so you can call it from anywhere
  • A demo scene, a PDF guide, and fully commented source code

What's new in 1.1

  • Updated for Unity 2022.3 LTS and newer, including Unity 6
  • Now comes with assembly definitions
  • Works with Enter Play Mode Options when domain reload is turned off
  • One broken sub routine no longer stops the others: the error is logged and the rest keep going
  • A few small bug fixes, including Repeat(1) running twice and a routine sometimes skipping a frame

Unity versions

Unity 2022.3 LTS and newer, including Unity 6. Any render pipeline, since it's code only. We checked the code against these versions but haven't tested every one in the editor yet. If something doesn't work in your version, tell us and we'll fix it.

Full documentation: https://mugheadstudios.com/docs/sub-routines

Questions or ideas? Email us at [email protected]. We read everything.

From the publisher's Asset Store listing.

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
2022.3.62f3 Compatible Compatible Compatible Compatible
2020.3.43f1 Compatible Compatible Compatible Compatible
2019.4.39f1 Compatible Compatible Compatible Compatible

As listed on the Asset Store.