You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 17, 2021. It is now read-only.
Hertzole edited this page Dec 26, 2018
·
1 revision
Delayed Actions
Delayed Actions is a singleton script and thread safe way to create delayed actions using only Unity's own Update. No coroutines, no threads or anything! It even hooks into the Update Manager if it's present.
All the actions run in parallel, so no action needs to be completed before one another.
How to use
It's pretty simple to use as it's a static class with only one important method.
using Hertzole.HertzLib;using UnityEngine;publicclassActionsToBeDelayed:MonoBehaviour{privatevoidStart(){
DelayedActions.ScheduleAction(()=>{ Debug.Log("Create actions on the fly like this!");},2);
DelayedActions.ScheduleAction(DelayedFunction,5);}privatevoidDelayedFunction(){
Debug.Log("Hello world... after 5 seconds of wait!");}}