You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Create a new script called *ConnectionManager.cs*. This script provides a user interface and the script logic required to connect to a distributed authority service session:
47
+
1. Create a new script called **ConnectionManager.cs**. This script provides a user interface and the script logic required to connect to a distributed authority service session:
48
+
48
49
```cs
49
50
usingSystem;
50
51
usingSystem.Threading.Tasks;
@@ -159,12 +160,13 @@ It's important to wait until `OnClientConnectedCallback` has been triggered befo
159
160
160
161
:::
161
162
162
-
2. Add the `ConnectionManager` component script you created to the *NetworkManager* object.
163
+
1. Add the **ConnectionManager** component script you created to the **NetworkManager** object.
Copy file name to clipboardExpand all lines: docs/learn/distributed-authority-webgl.md
+8-4
Original file line number
Diff line number
Diff line change
@@ -18,22 +18,26 @@ Before you begin, you need the following general requirements to use the distrib
18
18
- An active Unity account with a valid license.
19
19
- The [Unity Hub](https://unity.com/download).
20
20
- A supported version of the Unity 6 Editor. Refer to the [Netcode for GameObjects requirements](https://docs-multiplayer.unity3d.com/netcode/current/installation).
21
-
- When installing the Editor, make sure to include the __WebGL Build Support_ module.
21
+
- When installing the Editor, make sure to include the **WebGL Build Support** module.
22
22
23
23
You also need the following packages and minimum versions for a WebGL distributed authority session:
24
24
25
25
- Netcode for GameObjects version 2.1.1+
26
26
- Unity Transport version 2.3.0+
27
-
- Note that you don't need to create a self-signed certificate to connect to a distributed authority session.
27
+
- Note that you don't need to create a self-signed certificate to connect to a distributed authority session.
28
28
- Multiplayer Services version 1.0.2+
29
29
30
30
## Create and set up your project
31
31
32
32
Follow the instructions on the [distributed authority general quickstart](distributed-authority-quick-start.md) page.
33
33
34
+
## Configure the transport to use websockets
35
+
36
+
Enable the **Use Web Sockets** checkbox on the **DistributedAuthorityTransport** component that was added to the **NetworkManager** object. 
37
+
34
38
## Build and run with WebGL
35
39
36
-
1. Navigate to __File__ > __Build Profiles__ to open the __Build Profiles__ window. Select WebGL as your target platform.
37
-
1. From the __Build Profiles__ window, click __Build and Run__.
40
+
1. Navigate to **File** > **Build Profiles** to open the **Build Profiles** window. Select WebGL as your target platform.
41
+
1. From the **Build Profiles** window, click **Build and Run**.
38
42
- Unity launches a small web hosting app to provide the HTTP services required to launch the WebGL application in your browser.
39
43
1. Once you have one instance of your WebGL project running, you can copy the URI from your browser and paste it into another window or tab, which creates and connects another player to the same session.
0 commit comments