void Start() { AsyncResult result = new AsyncResult(); /* Register a callback */ result.Callbackable().OnCallback((r) => { if (r.Exception != null) { Debug.LogFormat("The task is finished.IsDone:{0} Exception:{1}", r.IsDone, r.Exception); return; } Debug.LogFormat("The task is finished. IsDone:{0} Result:{1}", r.IsDone, r.Result); }); /* Start the task */ this.StartCoroutine(DoTask(result)); }