Giter Site home page Giter Site logo

houssembaicha / better-unity-webgl-template Goto Github PK

View Code? Open in Web Editor NEW

This project forked from greggman/better-unity-webgl-template

0.0 0.0 0.0 12.67 MB

A better default template for Unity WebGL

Home Page: https://greggman.github.io/better-unity-webgl-template/

License: Creative Commons Zero v1.0 Universal

C# 7.03% CSS 30.91% HTML 62.06%

better-unity-webgl-template's Introduction

A Better Unity WebGL template

I have no idea why Unity choose to not make its WebGL exporter default to filling the window like pretty much all other WebGL apps on the net but in any case here is a template

screenshot

Example: https://greggman.github.io/better-unity-webgl-template/

Instructions 2020

Download and add in this unity package into your project. Then pick Edit->Project Settings->Player, in the WebGL tab under Resolution and Presentation pick "Better2020".

Change Assets/WebGLTemplates/Better2020/logo.png to whatever you want.

You can also set "Hide Full Screen Button" to 1 or true if you don't want the fullscreen button to appear in the bottom right.

See Unity docs on how to customize WebGL Templates.

Instructions 2019

Download and add in this unity package into your project. Then pick Edit->Project Settings->Player, in the WebGL tab under Resolution and Presentation pick "BetterTemplate".

Change Assets/WebGLTemplates/BetterTemplate/logo.png to whatever you want.

See Unity docs on how to customize WebGL Templates.

Changelist

  • 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 it some kind of event and/or make the template itself handle this. The issue is there's no easy way to know if the inserted elements are the mobile warning or something else.

      I suppose could check if the game has actually loaded. If no it's the mobile warning. If yes then disable the CSS. Oh well, burn that bridge when we get there.

    • Fix logo size css

    • Add viewport tag

better-unity-webgl-template's People

Contributors

greggman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.