Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Abort()

If in progress, halts the UnityWebRequest as soon as possible.
Read time 1 minuteLast updated 10 days ago

Definition

public void Abort()

Remarks

This method may be called at any time. If the UnityWebRequest has not already completed, the UnityWebRequest will halt uploading or downloading data as soon as possible. Aborted UnityWebRequests are considered to have encountered a system error. Depending upon the type of error, the UnityWebRequest.result property will return one of the error values: ConnectionError, ProtocolError, or DataProcessingError. The UnityWebRequest.error property will be
Request Aborted
.
If this method is called prior to calling UnityWebRequest.Send, then the UnityWebRequest will abort immediately after the call to UnityWebRequest.Send.
Calls to this method have no effect after this UnityWebRequest has encountered a different error, or has successfully finished communicating with the remote server.