UnityWebRequest オブジェクトは Web サーバーとの通信に使われます。
UnityWebRequests は Web サーバとの HTTP 通信のフローを処理します。他のオブジェクト - 特に DownloadHandler と UploadHandler - はダウンロードとアップロードのデータそれぞれを管理します。
多くの一般的なユースケースのために、適切に設定された UnityWebRequest オブジェクトを返す便利な静的関数があります。 Get、Post、Put、GetTexture
Note: Most properties on the UnityWebRequest object cannot be altered once the UnityWebRequest has begun communicating with a remote server by calling the Send method.
kHttpVerbCREATE | "CREATE" 文字列。通常 HTTP CREATE リクエストの Verb として使用します。 |
kHttpVerbDELETE | "DELETE" 文字列。通常、HTTP DELETE リクエストの Verb として使用します。 |
kHttpVerbGET | "GET" 文字列。通常 HTTP GET リクエストの Verb として使用します。 |
kHttpVerbHEAD | "HEAD" 文字列。通常 HTTP HEAD リクエストの Verb として使用します。 |
kHttpVerbPOST | "POST" 文字列。通常 HTTP POST リクエストの Verb として使用します。 |
kHttpVerbPUT | "PUT" 文字列。通常、HTTP PUT リクエストの Verb として使用します。 |
certificateHandler | Holds a reference to a CertificateHandler object, which manages certificate validation for this UnityWebRequest. |
chunkedTransfer | UnityWebRequest システムが HTTP/1.1 チャンク転送エンコード方法を採用すべきかどうかを示します。 |
disposeCertificateHandlerOnDispose | If true, any CertificateHandler attached to this UnityWebRequest will have CertificateHandler.Dispose called automatically when UnityWebRequest.Dispose is called. |
disposeDownloadHandlerOnDispose | True の場合、この UnityWebRequest にアタッチされているいずれかの DownloadHandler は、UnityWebRequest.Dispose が呼び出されるとき、自動的に DownloadHandler.Dispose を呼び出します。 |
disposeUploadHandlerOnDispose | True の場合、UnityWebRequest.Dispose が呼び出されたとき、この UnityWebRequest にアタッチされているいずれの UploadHandler は自動的に UploadHandler.Dispose を呼び出します。 |
downloadedBytes | システムがリモートサーバーからダウンロードしたボディデータのバイト数を返します。 |
downloadHandler | この UnityWebRequest でリモートサーバーから受信したデータを管理する DownloadHandler オブジェクトへの参照を保持します。 |
downloadProgress | ボディデータをサーバーからダウンロードの進行状況を示す 0.0 と 1.0 の間の浮動小数点値を返します。 |
error | HTTP リクエストまたはレスポンスを処理中に [UnityWebRequest]] オブジェクトによって発生したシステム エラーを説明する人間が判読できる文字列です。 |
isDone | [UnityWebRequest]] はリモートサーバーとの通信が終了した後、true を返します。 |
isHttpError | Returns true after this UnityWebRequest receives an HTTP response code indicating an error. (Read Only) |
isModifiable | UnityWebRequest の設定のプロパティーを変更することができる間、true が返されます。 |
isNetworkError | この UnityWebRequest システムエラーが発生した後は true を返します。 |
method | GET や POST など、この UnityWebRequest によって使用される HTTP Verb を定義します。 |
redirectLimit | この UnityWebRequest が「リダイレクト制限を超えた」システムエラーで停止する前にリダイレクトの数を示します。 |
responseCode | 200 、404 、500 などサーバーによって返される数値の HTTP レスポンスコード。 |
timeout | Sets UnityWebRequest to attempt to abort after the number of seconds in timeout have passed. |
uploadedBytes | システムがリモートサーバーにアップロードしたボディデータのバイト数を返します。 |
uploadHandler | リモートサーバーにアップロードするデータを管理する UploadHandler オブジェクトへの参照を保持します。 |
uploadProgress | ボディデータをサーバーにアップロードする進行状況を示す 0.0 と 1.0 の間の浮動小数点値を返します。 |
uri | Defines the target URI for the UnityWebRequest to communicate with. |
url | [UnityWebRequest]] と通信するターゲット URL を定義します。 |
useHttpContinue | UnityWebRequest が送信リクエストヘッダーに Expect: 100-Continue を含めるかどうかを決定します(デフォルト: true )。 |
UnityWebRequest | デフォルトのオプションと UnityWebRequest を作成し、DownloadHandler または UploadHandler をアタッチしません。デフォルトのメソッドは GET です。 |
Abort | 進行中の場合、UnityWebRequest をできるだけ早く停止させます。 |
Dispose | Signals that this UnityWebRequest is no longer being used, and should clean up any resources it is using. |
GetRequestHeader | カスタムリクエストヘッダの値を取得します。 |
GetResponseHeader | 最新の HTTP レスポンスの受信からレスポンスヘッダーの値を取得します。 |
GetResponseHeaders | 最新の HTTP レスポンスの UnityWebRequest によって受信されたすべてのレスポンスヘッダーを含むディクショナリを取得します。 |
SendWebRequest | リモートサーバーとの通信を開始します。 |
SetRequestHeader | HTTP リクエストヘッダーをカスタムの値にセットします。 |
ClearCookieCache | Clears stored cookies from the cache. |
Delete | HTTP DELETE のために設定した UnityWebRequest を作成します。 |
EscapeURL | 文字列の文字をエスケープし、URL に親和性があることを保証します。 |
GenerateBoundary | マルチパートフォームバウンダリーとして使うためのランダムな 40 バイトの配列を生成します。 |
Get | Create a UnityWebRequest for HTTP GET. |
Head | HTTP HEAD リクエストを送信するように設定された UnityWebRequest を作成します。 |
Post | Creates a UnityWebRequest configured to send form data to a server via HTTP POST. |
Put | Creates a UnityWebRequest configured to upload raw data to a remote server via HTTP PUT. |
SerializeFormSections | IMultipartFormSection オブジェクトのリストを RAW マルチパートフォームデータを含むバイト配列に変換します。 |
SerializeSimpleForm | URL エンコードされた UTF-8 のキャラクタを含むバイト配列にストリングのディクショナリをシリアライズします。 |
UnEscapeURL | エスケープシーケンス(特殊文字)を変換し、ユーザーが使いやすいテキストを返します。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.