Embedding the player


Let’s try embed the game on the itch.io page :). Reading the official HTML5 embed docs, that seems easy.

On your project’s edit page, after uploading an appropriate file to be embedded, you will see a new section called Embed options where you can configure how your code will be embedded.

  1. I make a build, zip it up and upload it.
    Hmmm, the embed settings are not showing. What did I do wrong?
    Ah I zipped the build folder, so instead of the index.html being at the top it’s 1 folder nested deep.

  2. I rezip the files, upload it. image.png
    But I still can’t see the embed settings. Let’s play it locally, see if something is wrong with the build. 🤔
    Hmm it doesn’t work locally. image.png

  3. I tried to install a local webserver to run the build, see if that would enable me to run it locally. Nope

  4. The build time takes quite long, so let’s uninstall all unused Unity packages. Building 720 universal render shaders, but AFAIK I don’t use any of those. After uninstalling the universal render pipeline all shaders break (so I guess I was using them), so I rehook up all materials. Make a new build, and change build settings from faster run speed to faster buld speed. image.png

  5. Now it runs locally. We did it! I upload the build in excitment, thinking it’s over. It is still not showing!? Aha, the docs were wrong, I need to manually set it to HTML in the project settings. image.png

  6. 🥳The embed settings are finally showing.

  7. Yeaa we got it working embedded, but resolution is now wrong WTF!? image.png

  8. Let’s set it to Auto-detect size (Unity only). That should do it, right? image.png
    image.png

  9. I set the resolution to a manual 900 x 550, it’s working.
    image.png

Leave a comment

Log in with itch.io to leave a comment.