Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Accessing external server data for Unity webgame

A topic by joespacio created Mar 16, 2018 Views: 1,071 Replies: 1
Viewing posts 1 to 2
(+1)

I am working on a Unity web game, and I am trying to set up a simple leaderboard system. I am currently using an external server (dreamlo) to access highscore data, and it seems to work when I run it on my machine. However, when I upload it to itch.io, it cannot access the server. Is there a way to get this to work, or if accessing an external server from a webgame not supported by itch.io?

Admin(+3)

You can make requests to external servers, but the headers on that server must be configured correctly, and that server must be HTTPS.

To learn more about the header requirements see this page: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

If you're using a service that specializing in providing leaderboards then I'm assuming they'll have a simple way to set it up. Note that our HTML5 games do not go through the itch.io domain, they are in an iframe.

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.