- Notifications
You must be signed in to change notification settings - Fork135
A better default template for Unity WebGL
License
greggman/better-unity-webgl-template
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
I have no idea why Unity choose to not make its WebGL exporter defaultto filling the window like pretty much all other WebGL apps on the netbut in any case here is a template
Example:https://greggman.github.io/better-unity-webgl-template/
Download and add inthis unity packageinto your project. Then pickEdit->Project Settings->Player, in the WebGL tabunderResolution and Presentation pick "Better2020".
ChangeAssets/WebGLTemplates/Better2020/logo.png to whatever you want.
You can also set "Hide Full Screen Button" to1 ortrue if you don't want the fullscreen button to appearin the bottom right.
SeeUnity docs on how to customize WebGL Templates.
Download and add inthis unity packageinto your project. Then pickEdit->Project Settings->Player, in the WebGL tabunderResolution and Presentation pick "BetterTemplate".
ChangeAssets/WebGLTemplates/BetterTemplate/logo.png to whatever you want.
SeeUnity docs on how to customize WebGL Templates.
0.1.0
- Add Unity 2020
0.0.3
Try to make mobile dialog appear above logo.
It's a little sad that Unity hard coded this rather than make itsome kind of event and/or make the template itself handle this.The issue is there's no easy way to know if the inserted elementsare the mobile warning or something else.
I suppose could check if the game has actually loaded. If no it'sthe mobile warning. If yes then disable the CSS. Oh well, burn thatbridge when we get there.
Fix logo size css
Add viewport tag
About
A better default template for Unity WebGL
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.


