No 'Access-Control-Allow-Origin' in webGL Unity Multiplayer
I'm using "Network Lobby" asset for unity and trying to make webGL build with using WebSockets. When I create a game or get a list of servers I get the following error:
XMLHttpRequest cannot load https://mm.unet.unity3d.com/json/reply/ListMatchRequest. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'my_domain_name' is therefore not allowed access.
Is it a problem on the server or on the client? And how can I solve it?
Answer by luisquid · Apr 18, 2017 at 10:21 PM
@mox1342 I don't you are able to use sockets with WebGl. At least not yet. You might have to use the WWW class or the UnityWebRequest class. I'll leave the source from where I read it, hope it helps. https://docs.unity3d.com/Manual/webgl-networking.html
Your answer
Follow this Question
Related Questions
Implementing very flexible multiplayer (UNET) Weapon System? 0 Answers
Uncaught abort(107) at Error while trying to run WebGL game 0 Answers
WebGL Cardboard VR (GVR) errors 1 Answer
WebGL Build error abort(117) at jsStackTrace (WebGL.js:1:19540) 0 Answers
[UNET] Network Transform doesnt work for the host. On Client it works seemless. 0 Answers