Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 634 Bytes

README.md

File metadata and controls

33 lines (26 loc) · 634 Bytes

Co

Coroutines in Anywhere, for Unity 5

How to Use

  • Case 1: Coroutines in plain class
public class PlainClass {

  public void PlainFunction () {
    Co.Run(Coroutine_In_PlainClass());
  }
  
  private IEnumerator Coroutine_In_PlainClass () {
    Debug.Log("Yey!");
    yield return new WaitForSeconds(1f);
    Debug.Log("Do Something!");
  }
  
}
  • Case 2: Running functions with delay in one line
private void SomeFunction () {
  Co.Delay(() => Debug.Log("Executed after 2 seconds!"), 2f);
}

Install

Please use unity-packman

License

MIT