Skip to main content

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

The embedded WebGL game is cropped

A topic by Mario Jacob created May 31, 2022 Views: 322 Replies: 2
Viewing posts 1 to 3
Submitted

On the Itch.io site, the embedded game is cropped on the side, how do I set the correct size?

https://mario-jacob.itch.io/rogue-pinball

In Unity I set in the player settings the HTML Settings to 720 x 480, and on Itch to 960 x 800 but it still doesn't fit.

Submitted

you must set your resolution in unity. I had same problem. Maybe do same with itch.io page and see if it works. 

Submitted

Two places to check:
- Set the resoltion in Unity, in the Player Settings (in your projects settings, or accessible on the Build settings page)
- Set the resolution of the player on Itch. When you select that the file will be played in the browser, you will see a bit below that there will be an option to set the resolution of the player. Just make sure it matches what you put in the player settings!

Also, if both of these do not work, look at your UI canvases in your Unity project to ensure elements have the correct anchors and pivot points. For WebGL, I prefer to set my Canvas scaler to scale with screen size and put everything in the same resolution I will end up using in itch.