Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit f46dfac

Browse files
update: da quick start mps sdk update 0 5 0 (#1294)
1 parent 7436551 commit f46dfac

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Before you begin, you need the following:
5050
```cs
5151
using System;
5252
using System.Threading.Tasks;
53+
using Unity.Netcode;
5354
using Unity.Services.Authentication;
5455
using Unity.Services.Core;
5556
using Unity.Services.Multiplayer;
@@ -136,8 +137,9 @@ public class ConnectionManager : MonoBehaviour
136137
AuthenticationService.Instance.SwitchProfile(_profileName);
137138
await AuthenticationService.Instance.SignInAnonymouslyAsync();
138139

139-
var options = new CreateSessionOptions(_maxPlayers) {
140-
Name = _sessionName
140+
var options = new SessionOptions() {
141+
Name = _sessionName,
142+
MaxPlayers = _maxPlayers
141143
}.WithDistributedConnection();
142144

143145
_session = await MultiplayerService.Instance.CreateOrJoinSessionAsync(_sessionName, options);
@@ -278,15 +280,16 @@ public class PlayerCubeController : NetworkTransform
278280
![create PlayerCube object](/img/learn/distributed-authority-quick-start/player-cube.png)
279281
3. Add a `NetworkObject` component to the *PlayerCube*.
280282
![add a NetworkObject component](/img/learn/distributed-authority-quick-start/add-networkobject.png)
281-
4. Add the *PlayerCubeController* to the *PlayerCube*.
283+
4. Set the `NetworkObject` Ownership to "None".
284+
5. Add the *PlayerCubeController* to the *PlayerCube*.
282285
![add the PlayerCubeController component](/img/learn/distributed-authority-quick-start/add-playercubecontroller.png)
283-
5. Create a Prefabs folder in the root Assets folder.
284-
6. Drag and drop the *PlayerCube* object into the newly created Prefabs folder.
286+
6. Create a Prefabs folder in the root Assets folder.
287+
7. Drag and drop the *PlayerCube* object into the newly created Prefabs folder.
285288
![create the player cube prefab](/img/learn/distributed-authority-quick-start/create-playercube-prefab.png)
286-
6. Delete the *PlayerCube* object from your scene.
287-
5. Open the Network Manager, navigate to **Prefab Settings**, and set the **Default Player Prefab** to be the newly created *PlayerCube*.
289+
8. Delete the *PlayerCube* object from your scene.
290+
9. Open the Network Manager, navigate to **Prefab Settings**, and set the **Default Player Prefab** to be the newly created *PlayerCube*.
288291
![set the default player prefab](/img/learn/distributed-authority-quick-start/assign-default-player-prefab.png)
289-
6. Save all changes to the scene.
292+
10. Save all changes to the scene.
290293

291294
## Next steps
292295

0 commit comments

Comments
 (0)