Skip to content

Instantly share code, notes, and snippets.

@neuecc
Last active October 4, 2016 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neuecc/80139f8abb12254365aa35524a428419 to your computer and use it in GitHub Desktop.
Save neuecc/80139f8abb12254365aa35524a428419 to your computer and use it in GitHub Desktop.
for Blog #3
async Task CoroutineBridge()
{
Debug.Log("start www await");
var www = await new WWW("https://unity3d.com");
Debug.Log(www.text);
await CustomCoroutine();
Debug.Log("await after 3 seconds");
}
IEnumerator CustomCoroutine()
{
Debug.Log("start wait 3 seconds");
yield return new WaitForSeconds(3);
Debug.Log("end 3 seconds");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment