Issues with Unity WebGL Game Hosted on Canister

Hi,

We’re developing a game using the Unity engine and have deployed it as a WebGL application hosted within a canister. Currently, we’re facing 2 of issues:

  1. The default fullscreen button from the page template is non-functional.
  2. The controller/gamepad is not being recognized or supported.

These problems don’t occur when the app is hosted on an Nginx web server—everything works perfectly there. There are no errors shown in the Chrome console, which leads me to believe the issues might be related to the canister environment.

Any advice or tips on how to resolve these issues would be greatly appreciated. Thanks in advance for any help!

1 Like

Just following up here, hoping some of the teams have prior experience of this

I have a Unity game deployed on a canister and the fullscreen button seems to work ok.
https://xtyia-wqaaa-aaaam-adcsa-cai.icp0.io/
I just put the dfx.json file below in the root folder of the Unity WebGL build and deployed. Hope this helps!

1 Like

I couldn’t get that to work myself on OSX safari

The guys over at @boomdao work on this stuff all the time. Maybe they can help out.

1 Like

Here, you can use this:

There are some instructions there too :slight_smile:

1 Like

thanks! We found that the canister added a few responsive headers in the page related to this. https://www.permissionspolicy.com/

Thanks for pointing this out. I have updated the header so that it will allow the gamepad interface. Maybe this will help the situation.

1 Like