Little background tasks for Unity. Wait, repeat, run for a while, or chain steps together, all in one line each.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 itWait, When, While, Always, RunFor, RepeatFrame-based helpers: RunNextFrame, RunAfterXFrames, RunForXFramesChain, to run sub routines one after another (chains can be nested)Pause, resume, or remove any sub routineNo MonoBehaviour or StartCoroutine needed, so you can call it from anywhereA demo scene, a PDF guide, and fully commented source codeWhat's new in 1.1Updated for Unity 2022.3 LTS and newer, including Unity 6Now comes with assembly definitionsWorks with Enter Play Mode Options when domain reload is turned offOne broken sub routine no longer stops the others: the error is logged and the rest keep goingA few small bug fixes, including Repeat(1) running twice and a routine sometimes skipping a frameUnity versionsUnity 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-routinesQuestions or ideas? Email us at craig.dennis@webregulate.co.uk. We read everything.







