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

Update networkobject.md #860

Merged
merged 3 commits into from
Nov 30, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/basics/networkobject.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ NetworkManager.Singleton.ConnectedClients[clientId].PlayerObject;
To find your own player object just pass `NetworkManager.Singleton.LocalClientId` as the clientId in the sample above.

### Network Prefabs
Network prefabs (NetworkPrefabs) are prefabs that contain a GameObject with a `NetworkObject` component. As an example, if you wanted to create a prefab to be the default player prefab, then you would create a prefab that at the root GameObject included a `NetworkObject` component and any additional player specific `NetworkBehabiour` components. You can then assign that prefab to the `NetworkManager` Player Prefab property to be used when a player is connected and approved. Each connected player will have a unique instance spawned on all connected clients (including the server).
Network prefabs (NetworkPrefabs) are prefabs that contain a GameObject with a `NetworkObject` component. As an example, if you wanted to create a prefab to be the default player prefab, then you would create a prefab that at the root GameObject included a `NetworkObject` component and any additional player specific `NetworkBehaviour` components. You can then assign that prefab to the `NetworkManager` Player Prefab property to be used when a player is connected and approved. Each connected player will have a unique instance spawned on all connected clients (including the server).

:::note
You can only have one `NetworkObject` at the root of a prefab. This means do not create prefabs with nested `NetworkObjects`!
Expand Down