Skip to main content

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

Access Query String/URL Parameters for Embedded HTML5 Games

A topic by nobloat created Mar 26, 2021 Views: 499
Viewing posts 1 to 1
(1 edit) (+4)

My goal is to have an invite link system where a URL like "https://user.itch.io/game?invitecode=something" can be accessed from my embedded Unity game, allowing players to join the multiplayer lobby with the "invitecode" of "something".

I've tried accessing "document.referrer" but it only returns the origin of the top-level URL; would it be feasible to change the Referrer-Policy so content hosted on the itch embedded game CDN can access the query string of the itch.io URL?

An API to access the URL's query string would also work just fine if that's less of a security concern.  Thanks.

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