IEnumerator deferral_thread(GameObject aDestroy, SignOutDeferral aDef) { yield return(null); aDef.Complete(); GameObject.Destroy(aDestroy); }
void OnUserSignOutStarted(int id, System.IntPtr deferred) { ManagerManager.Log("OnUserSignOutStarted " + id + " " + GetUserName(id)); var deferral = new SignOutDeferral(deferred); var dummy = (new GameObject("genDummy")).AddComponent <DummyBehaviour> (); dummy.StartCoroutine(deferral_thread(dummy.gameObject, deferral)); }