示例#1
0
        /// <summary>
        /// Creates an <see cref="IAsyncOperation{TResult}"/> wrapper for the specified <see cref="WWW"/>.
        /// </summary>
        /// <param name="request">The source web request.</param>
        public static IAsyncOperation <T> ToAsync <T>(this WWW request) where T : class
        {
            var result = new Helpers.WwwResult <T>(request);

            result.Start();
            return(result);
        }
示例#2
0
        /// <summary>
        /// Creates an <see cref="IAsyncOperation"/> wrapper for the specified <see cref="WWW"/>.
        /// </summary>
        /// <param name="request">The source web request.</param>
        public static IAsyncOperation ToAsync(this WWW request)
        {
            var result = new Helpers.WwwResult <object>(request);

            result.Start();
            return(result);
        }