Documenting the dark corners of the Unity Engine.
When using UnityWebRequest to load from the local filesystem:
file:⁄⁄be prepended to the location.
file:⁄⁄, but will tolerate it.
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
isDone == true on the
[UnityWebRequest]AsyncOperation object returned by
System.Diagnostics.Stopwatchshould be used for that since
Timeproperties will not be updated and
DateTime.UtcNowoutput can be changed by the user/system.