uri
Defines the target URI for the UnityWebRequest to communicate with.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Property
- Namespace: UnityEngine.Networking
- Assembly: UnityEngine.UnityWebRequestModule
public Uri uri { get; set; }
Remarks
The passed URI must be a full and absolute URI.
This property can't be set after calling UnityWebRequest.SendWebRequest.
If the UnityWebRequest encounters and follows redirects, this property updates with the URL to which the UnityWebRequest was redirected.
This property works like _url but is faster to set because it requires less validation and pre-processing. However, each time you access its value, a new URI instance is created, which is resource-intensive. The recommended best practice is to use this property when you need a URI object and to use _url when you need a resulting URL.