- 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.