Hello. Trying to read file from streaming assets on mac os unity editor and reseive an error Resource blocked by content blocker. Same on WebGL build on Mac os. On windows machine all fine in editor and builds.
Why? How to fix?
Code:
Ah, you are passing path to UWR, while you should pass URI. Wrap it with System.Uri and it should work in Editor.
As for web, how are you hosting the game? It should be server thingy.
Check the URL you web build accesses and the error you get from UWR. Likely either resulting URL is incorrect or access to those resources is blocked by the server.
I ran into this as well. Isn’t this something that Unity could fix under the hood with a #define? Seems odd that I have to go through my codebase and change all my WebRequests to use a URI now that I’m trying to add mac support, when Unity could fix this via:
UnityWebRequest(string path)
{ #if mac/ios/iosx_editor
return UnityWebRequest(new System.Uri(path); #else
// do standard web request. #endif
}