static UnityWebRequestWrapper()
{
unityWebRequestType = Type.GetType("UnityEngine.Networking.UnityWebRequest, UnityEngine");
if (unityWebRequestType == null)
{
unityWebRequestType = Type.GetType("UnityEngine.Experimental.Networking.UnityWebRequest, UnityEngine");
}
unityWebRequestMethods = unityWebRequestType.GetMethods();
unityWebRequestProperties = unityWebRequestType.GetProperties();
PropertyInfo isDoneProperty = unityWebRequestType.GetProperty("isDone");
PropertyInfo downloadProgressProperty = unityWebRequestType.GetProperty("downloadProgress");
PropertyInfo uploadProgressProperty = unityWebRequestType.GetProperty("uploadProgress");
PropertyInfo isErrorProperty = unityWebRequestType.GetProperty("isError");
PropertyInfo downloadedBytesProperty = unityWebRequestType.GetProperty("downloadedBytes");
PropertyInfo responseCodeProperty = unityWebRequestType.GetProperty("responseCode");
PropertyInfo downloadHandlerPropery = unityWebRequestType.GetProperty("downloadHandler");
PropertyInfo uploadHandlerPropery = unityWebRequestType.GetProperty("uploadHandler");
PropertyInfo errorProperty = unityWebRequestType.GetProperty("error");
setRequestHeaderMethod = unityWebRequestType.GetMethod("SetRequestHeader");
sendMethod = unityWebRequestType.GetMethod("Send");
getResponseHeadersMethod = unityWebRequestType.GetMethod("GetResponseHeaders");
isDoneGetMethod = isDoneProperty.GetGetMethod();
isErrorGetMethod = isErrorProperty.GetGetMethod();
uploadProgressGetMethod = uploadProgressProperty.GetGetMethod();
downloadProgressGetMethod = downloadProgressProperty.GetGetMethod();
downloadedBytesGetMethod = downloadedBytesProperty.GetGetMethod();
responseCodeGetMethod = responseCodeProperty.GetGetMethod();
downloadHandlerSetMethod = downloadHandlerPropery.GetSetMethod();
uploadHandlerSetMethod = uploadHandlerPropery.GetSetMethod();
errorGetMethod = errorProperty.GetGetMethod();
}