Hi all, i’m New in Unity and WebGL.
I have this problem, when i Use WWW class for get a JSON or a simple Image:
WWW wwwBase = new WWW(url);
And then export to WebGL i receive this error:
XMLHttpRequest cannot load - No ‘Access-Control-Allow-Origin’ header is present on the requested resource
What can I do?
sorry for my english.-
If the url
you are trying to access differs from the url where your game is hosted, you’ll need cross-origin resource sharing. Maybe read-up on this here:
This document defines the concept of an "origin", which represents a web principal. Typically, user agents isolate content retrieved from different origins to prevent a malicious web site operator from interfering with the operation of benign web...