Version: Unity 6.2 Alpha (6000.2)
Language : English
Using Web templates
Web template structure and instantiation

Add a custom Web template

Create a custom Web template to control the appearance of the HTML page that displays your content.

Custom templates appear in Web Player settings under Web Template with the folder name and thumbnail image you provide.

Create a custom template

The easiest way to create a custom Web template is to copy a built-in template folder then modify it to meet your needs. Each template folder contains an index.html file along with any other resources the page needs, such as images or stylesheets.

To create a custom template:

  1. Copy the built-in Default or Minimal template folder from <Unity Installation>/PlaybackEngines/WebGLSupport/BuildTools/WebGLTemplates/.
    Note: On macOS, you can find the Unity Installation folder in the Applications folder.
  2. In your project’s Assets folder, create a subfolder called WebGLTemplates.
  3. Place the copied template folder in the Assets/WebGLTemplates folder.
  4. Rename the copied template folder so you can identify it later.

Add a thumbnail image

To give the template a thumbnail image for reference:

  1. Add a 128x128-pixel image to the template folder.
  2. Name the image thumbnail.png.

Additional resources


对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Using Web templates
Web template structure and instantiation
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961