Exemplo n.º 1
0
        private static UnityNetworkingRequest CreateWebRequest(string url, WWWForm wwwForm, bool isAsset)
        {
            UnityNetworkingRequest result = null;

            if (wwwForm == null)
            {
                result = UnityNetworkingRequest.Get(url);
            }
            else if (isAsset)
            {
                result = UnityWebRequestAssetBundle.GetAssetBundle(url, 1);
            }
            else
            {
                result = UnityNetworkingRequest.Post(url, wwwForm);
            }
            return(result);
        }
Exemplo n.º 2
0
 public static UnityWebRequest Post(string uri, List <IMultipartFormSection> multipartFormSections)
 {
     byte[] boundary = UnityWebRequest.GenerateBoundary();
     return(UnityWebRequest.Post(uri, multipartFormSections, boundary));
 }