/// <summary> /// Creates an <see cref="IAsyncOperation{TResult}"/> wrapper for the specified <see cref="UnityWebRequest"/>. /// </summary> /// <param name="request">The source web request.</param> public static IAsyncOperation <T> ToAsync <T>(this UnityWebRequest request) where T : class { var result = new Helpers.WebRequestResult <T>(request); result.Start(); return(result); }
/// <summary> /// Creates an <see cref="IAsyncOperation"/> wrapper for the specified <see cref="UnityWebRequest"/>. /// </summary> /// <param name="request">The source web request.</param> public static IAsyncOperation ToAsync(this UnityWebRequest request) { var result = new Helpers.WebRequestResult <object>(request); result.Start(); return(result); }