Skip to content

leon-do/unity-webgl-fullscreen-dark-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

Unity WebGL Full Width && Dark Theme

demo

How to use

Create a folder called WebGLTemplates under /Assets

Download FullDarkThemeTemplate from here and paste under WebGLTemplates

Screen Shot 2020-07-07 at 2 34 38 AM

To use

Screen Shot 2020-07-07 at 2 25 13 AM

Player Settings...

Screen Shot 2020-07-07 at 2 25 22 AM

Update the WebGL Template

Screen Shot 2020-07-07 at 2 37 17 AM

Under the hood

The base is from the Default template.

style.css was changed

html {
  background-color: black;
}

/* maintain 960x540 aspect ratio */
#unityContainer {
  width: 100vw;
  height: 56.25vw;
}

@media only screen and (max-width: 960px), (max-height: 540px) {
  #unityContainer {
    width: 960px;
    height: 540px;
  }
}

.webgl-content * {
  border: 0;
  margin: 0;
  padding: 0;
}

.webgl-content {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

resources

https://docs.unity3d.com/530/Documentation/Manual/webgl-templates.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published