private IEnumerator GetAccountByUserID(string userID, Result <AccountInfo> result) { Result <StorageAccountInfo> r = new Result <StorageAccountInfo>(this); yield return(StartCoroutine(storage.GetAccountByUserID(userID, r))); var storageUser = r.Value; result.SetValue(new AccountInfo(storageUser.userID, storageUser.userName, storageUser.data)); }