better-unity-webgl-template icon indicating copy to clipboard operation
better-unity-webgl-template copied to clipboard

Full screen on click

Open hershko opened this issue 6 years ago • 2 comments

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 :)

hershko avatar Aug 07 '19 16:08 hershko

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 :)

Lonyin-Chan avatar Jul 25 '20 16:07 Lonyin-Chan

I have same issue. Somebody Help Me!

Falcon5077 avatar Jan 12 '24 13:01 Falcon5077