Async
Common module includes AsyncAwaitSupport. (Github)
- without UniRx
- SimpleCoroutineAwaiter<WWW> function replaced by SimpleCoroutineAwaiter<UnityWebRequest>
Use async anywhere
using UnityEngine;
using Wonderland;
public class AsyncTest : MonoBehaviour {
async void Start() {
print("classic 0");
await new WaitForSeconds(2f);
print("classic 1");
await new WaitForSeconds(2f);
print("classic 2");
}
}