-
Notifications
You must be signed in to change notification settings - Fork 0
Utils
TinyPlay edited this page Aug 5, 2022
·
1 revision
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!");
}
}This framework is under MIT license. Developed by Ilya Rastorguev specially for Pixel Incubator.
You can ask me about XDot Framework using Telegram @SodaBoom or by email: iliya-sdt@yandex.ru