I tried to connect the dedicated server with a WebGL build hosted on itch.io, but it failed, any help?
You mean, from your itch io webgl build, you are connect into your own server?
And it works locally?
What is the error message in browser console? (F12 key to open)
- From where are you trying to connect?
- Provide fail message.
While developing Gallery Kit, I tested it with Text Files by URL that were located on my website, so Web Requests were from my Local Computer from Unity Editor.
This information I discovered:
By default, the Gallery Kit (WebGL App) was tested with the Text by URL that is located on the same domain as the App itself.
To Load Text by URL via a domain other than the domain where the App is located (that is, to perform cross-domain request), you need to customize that web-server with Text by URL. The “Access-Control-Allow-Origin” header should be added to the server response on the server side (and not to the request on the client side). It’s out of the scope of this manual, but you can learn this post.
So, for this reason, the Text by URL may not load if you are testing on your Local Web Server on a Desktop that Unity runs for you after Building for WebGL.
I have a WebGL build that I uploaded to itch.io, and I am trying to connect it to a Linux dedicated server hosted on Unity Cloud using UGS. The WebGL connects successfully from the editor, but it fails to connect when I upload the build on itch.io
Open the browser console and check for any error messages.
Make sure both the server and client builds have WebSockets enabled.