Multiple Unity WebGL players on a single page using Hugo shortcodes

29 June 2021 webdev gamedev

Using Hugo shortcodes and modifying the default Unity WebGL player to allow for easy embedding within a Hugo page, and adding support for multiple playes on the same page without using iframes.

This content does not resize on smaller browser widths. Try using the fullscreen button below (after loading the game).
WebGL builds are not supported on mobile devices.
This content does not resize on smaller browser widths. Try using the fullscreen button below (after loading the game).
WebGL builds are not supported on mobile devices.

Looks like it works! Although they both seem to take input at the same time… sharing focus?

To-do

  • figure out how to prevent the focus sharing
  • share the code

Update

I’ve shared the code, see updated post.

comments powered by Disqus