Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WebGL template structure specification in b19?

Discussion in 'Unity 5 Pre-order Beta' started by tomekkie2, Jan 13, 2015.

  1. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    973
    There are two templates available in b19, but I can't see any template structure specs.
    The "template" search in the manual returns "Using Webplayer Templates", but nothing on webgl.
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Sorry, the manual is not up to date on this yet. The process is basically the same as for web player templates, though:

    -Create a Folder "WebGLTemplates" in your assets folder
    -Copy Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/WebGLTemplates/Default to that folder, and rename it as you like
    -Edit the template to your liking.

    Unfortunately, there is a bug right now where Unity will pick up .js files in the template and try to compile them as Unity Script files, and then fail doing so. This is fixed, but you will need to wait for a new release (b20 or b21) to use this.

    Edit: b21, it will be, missed b20 branch-off by a couple of hours.
     
    Last edited: Jan 13, 2015
  3. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    973
    That will be great. Thanks a lot.
     
  4. Chris333

    Chris333

    Joined:
    Dec 15, 2014
    Posts:
    13
    Hello,

    where exactly is the folder "Unity.app/Contents/PlaybackEngines/WebGLSupport/BuildTools/WebGLTemplates/Default" located?

    edit:
    using atm beta 18, maybe thats why i cant find it. I will update to the latest build as soon as the website is back.
     
    Last edited: Jan 22, 2015
  5. Matheos

    Matheos

    Joined:
    Feb 25, 2015
    Posts:
    1
    i tried to copy my custom template into the WebplayerTemplets folder and the templates didnt show up. I then tried putting my template into the folder where the Default template is located. which was:

    Program Files\Unity\Editor\Data\PlaybackEngines\webglsupport\BuildTools\WebGLTemplates

    this seemed to work after i restarted unity.

    for reference i am running Unity 5.0.0f2 Pro

    Hope this helps. Also if there is a bettter way please let me know.

    thanks
     
  6. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    For WebGL, you should put it into a folder called "WebGLTemplates", not "WebplayerTemplets".