This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
unitywebrequest [2021/05/28 20:37] gwenpri.me slashes |
unitywebrequest [2021/12/24 23:00] archo on using UWR at exit time |
||
---|---|---|---|
Line 4: | Line 4: | ||
* macOS and iOS require that '' | * macOS and iOS require that '' | ||
- | * Android **must not** have this | + | * Android **must not** have '' |
- | * Windows | + | * Windows |
- | * Other targets are untested. | + | |
+ | ==== Sending requests during destruction ==== | ||
+ | |||
+ | To ensure that UnityWebRequest operations are completed even if the MonoBehaviour is being destroyed (e.g. when the game is exiting), it appears to be safe on at least some platforms (such as Windows) to manually wait in a loop inside '' | ||
+ | |||
+ | * Note however that mobile platforms don't provide destruction callbacks at all and will usually simply kill the process. | ||
+ | * It is recommended to limit the maximum running time of such a loop, and an appropriate time measurement method like '' |