@@ -50,6 +50,7 @@ Before you begin, you need the following:
5050``` cs
5151using System ;
5252using System .Threading .Tasks ;
53+ using Unity .Netcode ;
5354using Unity .Services .Authentication ;
5455using Unity .Services .Core ;
5556using 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 )
2792813 . 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