I’m trying to embed my Unity game into my website, but it doesn’t load. When I check the browsers console this message shows up:
Access to XMLHttpRequest at ‘htps:/infinityfree.net/errors/404/’ (redirected from ‘htp:/hernanmr95.epizy,com/JUEGOS/DogeFever/Build/WebGL.data.unityweb’) from origin ‘htp:/hernanmr95.epizy,com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
And also this:
Cross-Origin Read Blocking (CORB) blocked cross-origin response https://infinityfree.net/errors/404/ with MIME type text/html. See […] for more details.
Please tell me what can I do to fix this. I tried everything I read in the forums.
Thanks a lot
I have worked in Unity before, and there should be an “Export as web” or “Export as HTML” in the build menu. You may have to create a duplicate project depending on how you have it setup.
This means your code is trying to access the file at htp:/hernanmr95.epizy,com/JUEGOS/DogeFever/Build/WebGL.data.unityweb, but this file cannot be found.
Please double check that you have uploaded the file.
Given that it’s a data file, please check the file size as well. Our servers have a file size limit of 10 MB, and files larger than that are automatically deleted.