redirectLimit
Indicates the number of redirects that this UnityWebRequest follows before halting with a Redirect Limit Exceeded system error.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Property
- Namespace: UnityEngine.Networking
- Assembly: UnityEngine.UnityWebRequestModule
public int redirectLimit { get; set; }
Remarks
If you want to disable redirects altogether, set this property to zero - this will then refuse to follow redirects. If a redirect is encountered while redirects are disabled, the request will halt with a system error.
UnityWebRequestRedirect Limit ExceededIf you don't want to limit the number of redirects, you can set this property to any negative number. Note: This is not recommended. If the redirect limit is disabled and the encounters a redirect loop, the will consume processor time until UnityWebRequest.Abort is called.
UnityWebRequestUnityWebRequestNote: On WebGL platforms, the API behaves differently. It only supports a redirect limit of where the request fails on a redirect, and for anything above , it uses the browser-default redirect limit. This applies to Unity 2021.3 and later versions.
UnityWebRequest00Default value: .
32