Skip to content

Commit b0a3af5

Browse files
committed
chore: update webgl.md
1 parent 607c354 commit b0a3af5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

WebGL.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ Live example can be found at https://immutable.github.io/unity-immutable-sdk/sam
1111

1212
WebGL template is a configuration setting that lets you control the appearance of the HTML page, so that you can: test, demonstrate, and preview your WebGL application in a browser.
1313

14-
A WebGL Template is always needed for creating a WebGL application and it will always be stored within **Assets > WebGL Templates** to be used. You can refer to [Unity: WebGL Templates](https://docs.unity3d.com/Manual/webgl-templates.html) for more information.
14+
1. Create a custom WebGL template:
15+
- Navigate to **Assets > WebGLTemplates** in your Unity project.
16+
- Copy one of the built-in templates (Default or Minimal) from **[Unity Installation] > PlaybackEngines > WebGLSupport > BuildTools > WebGLTemplates**.
17+
- Rename the copied template to something meaningful for your project.
1518

16-
A Custom WebGL Template is required to implement the Immutable Unity SDK in WebGL projects. The easiest way to create a new custom WebGL template is to make a copy of the built-in Default or Minimal templates, which are stored in corresponding subfolders under <Unity Installation> > PlaybackEngines > WebGLSupport > BuildTools > WebGLTemplates.
17-
18-
Every Unity Project includes these templates by default. Copy a template and place it in your own **Assets > WebGLTemplates** folder, and rename it to something meaningful so you can identify your template later.
19-
20-
Once you have created your own template, copy the following files from Passport package into the **Assets > WebGLTemplates** folder:
19+
2. Copy the following files from the Passport package into your **Assets > WebGLTemplates** folder:
2120
- `Packages/Immutable Passport/WebGLTemplates~/unity-webview.js`
2221
- `Packages/Immutable Passport/WebGLTemplates~/callback.html`
2322
- `Packages/Immutable Passport/WebGLTemplates~/logout.html`
@@ -35,6 +34,7 @@ Once you have created your own template, copy the following files from Passport
3534
Follow these steps for implementation:
3635
> [!NOTE]
3736
> You can rename `callback.html` and `logout.html` to suit your project needs.
37+
> For local testing with WebGL builds, note the random port number assigned (e.g., http://localhost:60750). You may need to update the Hub Passport config each time you start a new local WebGL build, as the port number may change.
3838
1. Define a deep link scheme for your game:
3939
- Redirect URL: https://game.domain.com/callback.html
4040
- Logout URL: https://game.domain.com/logout.html

0 commit comments

Comments
 (0)