DownloadHandlerTexture注意事项
Windows编辑器崩溃
如果URL传入的是一个空值,则会发生崩溃。
UnityWebRequest request = UnityWebRequestTexture.GetTexture(url); yield return request .SendWebRequest();
下载的纹理损坏
DownloadHandlerTexture creates a texture from downloaded data automatically, but if you switch scene or unload unused assets, that texture can be destroyed as unused. Depending on at what moment this happens, the behavior is non-deterministic.
Bottom line: don't use DownloadHandlerTexture if you do unload unused assets or switch scenes while download is going.
https://forum.unity.com/threads/downloadhandlertexture-crash.514484/