Skip to content
TinyPlay edited this page Aug 5, 2022 · 1 revision

Coroutine Provider

This class provide simple Coroutines support for Non-mono classes in the Unity. You can use it in Providers, but this is not a good solution. Instead this - use game events.

Anyway, you can provide coroutine like this:

public class MyNonMonoClass
{
    public MyInitMethod()
    {
        CoroutineProvider.Start(MyCoroutine()); // You can start your coroutine like in Mono
    }

    private IEnumerator MyCoroutine()
    {
        Debug.Log("I think...");
        yield return new WaitForSeconds(1f);
        Debug.Log("It's work!");
    }
}

General Topics:

Development Info

This framework is under MIT license. Developed by Ilya Rastorguev specially for Pixel Incubator.

Contacts

You can ask me about XDot Framework using Telegram @SodaBoom or by email: iliya-sdt@yandex.ru

Clone this wiki locally