文档

Unity Engine

Unity Engine

SendWebRequest()

Begin communicating with the remote server.
阅读时间1 分钟最后更新于 21 天前

Definition

public UnityWebRequestAsyncOperation SendWebRequest()

Returns

Type

Description

UnityWebRequestAsyncOperationAn UnityWebRequestAsyncOperation object that tracks the progress of the request. Yield it inside a coroutine to wait until the request finishes or encounters a system error.

Remarks

After calling this method, the UnityWebRequest will perform DNS resolution (if necessary), transmit an HTTP request to the remote server at the target URL and process the server’s response.
This method can only be called once on any given UnityWebRequest object.
Once this method is called, you cannot change any of the UnityWebRequest’s properties. You cannot change UnityWebRequest properties after UnityWebRequest.SendWebRequest is called.