Skip to content

Instantly share code, notes, and snippets.

@is8r
Created October 12, 2016 09:21
Show Gist options
  • Save is8r/d783047132a385c6c121095b7529bd55 to your computer and use it in GitHub Desktop.
Save is8r/d783047132a385c6c121095b7529bd55 to your computer and use it in GitHub Desktop.
void Start()
{
Coroutine coroutine = StartCoroutine(DelayMethod(1.0f, (int id) => {
Debug.Log("StartCoroutine: "+id);
}, 0));
}
private IEnumerator DelayMethod<T>(float waitTime, Action<T> action, T t)
{
yield return new WaitForSeconds(waitTime);
action(t);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment