Skip to content

Commit 02218fb

Browse files
Adding WebGL quickstart page (#1376)
Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
1 parent 9234551 commit 02218fb

File tree

4 files changed

+55
-8
lines changed

4 files changed

+55
-8
lines changed

docs/learn/distributed-authority-quick-start.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: distributed-authority-quick-start
3-
title: Distributed authority quickstart for Netcode for GameObjects
3+
title: Distributed authority general quickstart
44
---
55

66
Use this guide to learn how to create your first [distributed authority](../terms-concepts/distributed-authority.md) Netcode for GameObjects project. It walks you through the connection setup, including connecting to the distributed authority service, and adding basic gameplay.
@@ -15,8 +15,7 @@ Before you begin, you need the following:
1515

1616
- An active Unity account with a valid license.
1717
- The [Unity Hub](https://unity.com/download).
18-
- A supported version of the Unity 6 Editor.
19-
- Additional requirements information can be found here: [Netcode for GameObjects requirements](https://docs-multiplayer.unity3d.com/netcode/current/installation).
18+
- A supported version of the Unity 6 Editor. Refer to the [Netcode for GameObjects requirements](https://docs-multiplayer.unity3d.com/netcode/current/installation).
2019

2120
## Project setup
2221

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
id: distributed-authority-webgl
3+
title: Distributed authority and WebGL quickstart
4+
---
5+
6+
Use this guide to learn how to create your first [distributed authority](../terms-concepts/distributed-authority.md) Netcode for GameObjects WebGL project.
7+
8+
This guide is intended as an addition to the [distributed authority general quickstart](distributed-authority-quick-start.md) page, which provides more details about setting up Netcode for GameObjects to use distributed authority.
9+
10+
:::note Beta feature
11+
Distributed authority is still in beta. During the beta phase, using the distributed authority service provided by the [Multiplayer Services package](https://docs.unity.com/ugs/en-us/manual/mps-sdk/manual) is free. When distributed authority is fully released, [using the service will incur a cost](https://unity.com/products/gaming-services/pricing).
12+
:::
13+
14+
## Prerequisites
15+
16+
Before you begin, you need the following general requirements to use the distributed authority network topology:
17+
18+
- An active Unity account with a valid license.
19+
- The [Unity Hub](https://unity.com/download).
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.
22+
23+
You also need the following packages and minimum versions for a WebGL distributed authority session:
24+
25+
- Netcode for GameObjects version 2.1.1+
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.
28+
- Multiplayer Services version 1.0.2+
29+
30+
## Create and set up your project
31+
32+
Follow the instructions on the [distributed authority general quickstart](distributed-authority-quick-start.md) page.
33+
34+
## Build and run with WebGL
35+
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__.
38+
- Unity launches a small web hosting app to provide the HTTP services required to launch the WebGL application in your browser.
39+
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.

docs/tutorials/get-started-with-ngo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: get-started-ngo
3-
title: Client-server quickstart for Netcode for GameObjects
3+
title: Client-server quickstart
44
---
55

66
Use this guide to learn how to create your first [client-server](../terms-concepts/client-server.md) Netcode for GameObjects project. It walks you through creating a simple Hello World project that implements the basic features of Netcode for GameObjects.
@@ -403,7 +403,7 @@ namespace HelloWorld
403403
}
404404
```
405405

406-
#### A Review of the `HelloWorldPlayer.cs` script
406+
#### A Review of the `HelloWorldPlayer.cs` script
407407

408408
The `HelloWorldPlayer.cs` script adds some basic movement to the Hello World project player. Both the server player and the client player can start player movement. However, the movement occurs through the server's position NetworkVariable, which means the server player can move immediately, but the client player must request a movement from the server, wait for the server to update the position NetworkVariable, then replicate the change locally.
409409

sidebars.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,18 @@ module.exports = {
4545
"id": "tutorials/get-started-ngo"
4646
},
4747
{
48-
"type": "doc",
49-
"id": "learn/distributed-authority-quick-start"
50-
},
48+
"collapsed": true,
49+
"type": "category",
50+
"label": "Distributed authority quickstart",
51+
"items": [
52+
{
53+
"type": "doc",
54+
"id": "learn/distributed-authority-quick-start"
55+
},
56+
{
57+
"type": "doc",
58+
"id": "learn/distributed-authority-webgl"
59+
},
5160
{
5261
"collapsed": true,
5362
"type": "category",

0 commit comments

Comments
 (0)