In case I would like to use a QR code to link to my game, is there a way to include additional data on the QR code that will be loaded into variables so the game will recognize the QR code also (for example, import a word into the game so the game will run a function using that word)?
Sure, you can encode the variables in the address query string (i.e. http://www.mydomain.com/mygame.php?level=LevelName), and access them from unity using one of the following methods:
- Unity-Browser cross communication
- Manually retrieving data from the embed address using Application.srcValue
First method will require some client-side js work to get the data from the client into the Unity webplayer.
The second method can be done using server-side script only, that will append the parameters from the address to the Unity3d embed path.
Hope this helps, good luck