public static async UniTask <T> ReturnExistingAsync <T>([NotNull] AsyncLoadInfo <T> info, [NotNull] string errorMessage) { Debug.Assert(info != null); while (info.IsLoading()) { await UniTask.Yield(); } if (info.IsSuccessful()) { return(info.Result); } else { throw new ApplicationException(errorMessage); } }
public static void Success <T>([NotNull] this AsyncLoadInfo <T> info, in T result)