greggman / better-unity-webgl-template

A better default template for Unity WebGL
https://greggman.github.io/better-unity-webgl-template/
Creative Commons Zero v1.0 Universal
760 stars 137 forks source link

Full screen on click #8

Open hershko opened 5 years ago

hershko commented 5 years ago

The game goes full screen when I first click on the canvas.

For now I stopped this behaviour by adding a Fullscreen.jslib to the project with this code:

var LibraryFullscreen = {
    JS_SystemInfo_HasFullscreen: function()
    {
        return 0;
    }
};
mergeInto(LibraryManager.library, LibraryFullscreen);

I'm on the latest version of Chrome, if it matters (looks like it doesn't happen on Firefox). Thanks for the help :)

Lonyin-Chan commented 4 years ago

Where do you put this file? In build folder or with index?

The game goes full screen when I first click on the canvas.

For now I stopped this behaviour by adding a Fullscreen.jslib to the project with this code:

var LibraryFullscreen = {
    JS_SystemInfo_HasFullscreen: function()
    {
        return 0;
    }
};
mergeInto(LibraryManager.library, LibraryFullscreen);

I'm on the latest version of Chrome, if it matters (looks like it doesn't happen on Firefox). Thanks for the help :)

Falcon5077 commented 10 months ago

I have same issue. Somebody Help Me!