Search Unity

My WebGL Template is not managed properly in 5.6 beta

Discussion in 'Web' started by ypoeymirou, Mar 20, 2017.

  1. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    Hi,

    My WebGL Template is not managed properly in 5.6 beta.
    My template is used but the %UNITY_WEBGL_LOADER_GLUE% section is not replaced properly.

    Reported: Case 893205

    Thanks,

    Yvan
     
  2. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    FYI, Unity confirmed the issue and forwarded it to their coders.
     
  3. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    There has been changes related to WebGL Templates in 5.6 because of the new embedding API. Though, I believe the documentation still need to be updated.
    You can find the default templates in your Editor installation folder under: PlaybackEngines/WebGLSupport/BuildTools/WebGLTemplates
    The minimal template looks like:

    Code (csharp):
    1. <html lang="en-us">
    2.   <head>
    3.     <meta charset="utf-8">
    4.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    5.     <title>Unity WebGL Player | %UNITY_WEB_NAME%</title>
    6.     <script src="%UNITY_WEBGL_LOADER_URL%"></script>
    7.     <script>
    8.       var gameInstance = UnityLoader.instantiate("gameContainer", "%UNITY_WEBGL_BUILD_URL%");
    9.     </script>
    10.   </head>
    11.   <body>
    12.     <div id="gameContainer" style="width: %UNITY_WIDTH%px; height: %UNITY_HEIGHT%px; margin: auto"></div>
    13.   </body>
    14. </html>
     
  4. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    Thank you for the information !