Build-time or runtime patching via remote manifests.
Uploading data to servers, such as:
Player metrics.
Saved game state.
Error/exception logs and crash reports.
Custom telemetry and analytics.
Integrating with content delivery networks, authentication and security, payment platforms, multiplayer services, diagnostics, and remote build pipelines.
Implementing low-traffic, networked multiplayer and turn-based games, such as chess.
Architecture
The Unity web request system consists of two layers:
A High-Level API (HLAPI) wraps the low-level API and provides a convenient interface for common operations.
A Low-Level API (LLAPI) provides maximum flexibility for more advanced oeprations.
The system breaks down an HTTP transaction into the following operations:
Sending data to the server.
Receiving data from the server.
HTTP flow control (for example, redirects and error handling).
Each of these operations are managed by a specific type of object, which you can use to customize and control aspects of the transaction:
An UploadHandler object handles transmission of data to the server.
A DownloadHandler object handles receipt, buffering, and postprocessing of data received from the server.
A UnityWebRequest object manages the other two objects, and also handles HTTP flow control. This object is where custom headers and URLs are defined, and where error and redirect information is stored.
Data sent from user code passes through an UploadHandler and then a UnityWebRequest before reaching the HTTP web server. Data received from the server passes through a UnityWebRequest and then a DownloadHandler before reaching user code.
The following is a high level overview of a HTTP transaction: