All Projects → appetizermonster → Unity3d Co

appetizermonster / Unity3d Co

Licence: mit
Coroutines in Anywhere, for Unity 5

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].