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.
-
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. -
I rezip the files, upload it.
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. -
I tried to install a local webserver to run the build, see if that would enable me to run it locally. Nope
-
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.
-
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.
-
🥳The embed settings are finally showing.
-
Yeaa we got it working embedded, but resolution is now wrong WTF!?
-
Let’s set it to Auto-detect size (Unity only). That should do it, right?
-
I set the resolution to a manual 900 x 550, it’s working.
Duck Duck Dance
Cool duck rhythm game
More posts
- Conversation over breakfastApr 07, 2024
Leave a comment
Log in with itch.io to leave a comment.