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

Commit 3724772

Browse files
authored
Develop into main (#1317)
1 parent 1f472c8 commit 3724772

File tree

6 files changed

+17
-8
lines changed

6 files changed

+17
-8
lines changed

docs/basics/networkobject.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ When spawning a NetworkObject, the `NetworkObject.GlobalObjectIdHash` value init
2020

2121
You can use [NetworkBehaviours](networkbehaviour.md) to add your own custom Netcode logic to the associated NetworkObject.
2222

23-
:::warning
23+
### Component order
2424

25-
The order of networked objects matters. Make sure to load any NetworkBehaviour components before the Network Object component on the GameObject.
25+
The order of components on a networked GameObject matters. When adding netcode components to a GameObject, ensure that the NetworkObject component is ordered before any NetworkBehaviour components.
2626

27-
:::
27+
The order in which NetworkBehaviour components are presented in the **Inspector** view is the order in which each associated `NetworkBehaviour.OnNetworkSpawn` method is invoked. Any properties that are set during `NetworkBehaviour.OnNetworkSpawn` are set in the order that each NetworkBehaviour's `OnNetworkSpawned` method is invoked.
28+
29+
#### Avoiding execution order issues
30+
31+
You can avoid execution order issues in any NetworkBehaviour component scripts that have dependencies on other NetworkBehaviour components associated with the same NetworkObject by placing those scripts in an overridden `NetworkBehaviour.OnNetworkPostSpawn` method. The `NetworkBehaviour.OnNetworkPostSpawn` method is invoked on each NetworkBehaviour component after all NetworkBehaviour components associated with the same NetworkObject component have had their `NetworkBehaviour.OnNetworkSpawn` methods invoked (but they will still be invoked in the same execution order defined by their relative position to the NetworkObject component when viewed within the Unity Editor **Inspector** view).
2832

2933
## Ownership
3034

docs/basics/scenemanagement/client-synchronization-mode.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Client synchronization occurs when immediately after a client connects to a host
99

1010
The client synchronization mode should be set when the server or host is first provided via the `NetworkSceneManager.SetClientSynchronizationMode` method that takes a [`LoadSceneMode`](https://docs.unity3d.com/ScriptReference/SceneManagement.LoadSceneMode.html) value as a parameter. Each client synchronization mode behaves in a similar way to loading a scene based on the chosen `LoadSceneMode`.
1111

12+
::note Distributed authority contexts
13+
When using a [distributed authority network topology](../../terms-concepts/distributed-authority.md), any client can set the client synchronization mode when they're promoted to session owner. Late-joining clients are synchronized using whatever setting the current session owner has.
14+
::
15+
1216
## Single Client Synchronization Mode
1317
_(Existing Client-Side Scenes Unloaded During Synchronization)_
1418

docs/components/networkmanager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ NetworkManager.Singleton.StartClient(); // Starts the NetworkManager as jus
4747
```
4848

4949
:::warning
50-
Don't start a NetworkManager within a NetworkBehaviour's Awake method as this can lead to undesirable results depending upon your project's settings!
50+
Don't start a `NetworkManager` within any `NetworkBehaviour` component's method; doing so can produce timing-related issues that cause the `NetworkManager` to only start once or not at all. `NetworkManager`s begin and end a network session, while `NetworkBehaviour` components are used during a network session. By the time you're using `NetworkBehaviour`s, a `NetworkManager` should already be running.
5151
:::
5252

5353
:::note

docs/release-notes/ngo-changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ The following content tracks features, updates, bug fixes, and refactoring for t
88

99
| Release | Date | Changelog |
1010
|---|---|---|
11-
| 2.0.0-exp | 2024-04-02 | [2.0.0-exp](https://docs.unity3d.com/Packages/[email protected]/changelog/CHANGELOG.html) |
11+
| 2.0.0-pre | 2024-06-17 | [2.0.0-pre](https://docs.unity3d.com/Packages/[email protected]/changelog/CHANGELOG.html) |
12+
| 2.0.0-exp | 2024-04-02 | [2.0.0-exp](https://docs.unity3d.com/Packages/[email protected]/changelog/CHANGELOG.html#200-exp2---2024-04-02) |
1213
| 1.10.0 | 2024-07-22 | [1.10.0](https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/blob/release/1.10.0/com.unity.netcode.gameobjects/CHANGELOG.md) |
1314
| 1.9.1 | 2024-04-18 | [1.9.1](https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/releases/tag/ngo%2F1.9.1) |
1415
| 1.8.0 | 2023-12-12 | [1.8.0](https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/releases/tag/ngo%2F1.8.0) |

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ module.exports = {
237237
lastVersion: "current",
238238
versions: {
239239
current: {
240-
label: "2.0.0-exp",
240+
label: "2.0.0-pre",
241241
path: "current",
242242
},
243243
"1.10.0": {

transport/workflow-client-server-secure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ void Start ()
134134
When creating the `NetworkDriver`, pass in this `NetworkSettings` object:
135135

136136
```csharp
137-
m_Driver = NetworkDriver.Create(settings);
137+
m_Driver = NetworkDriver.Create(settings);
138138
```
139139

140140
That’s all you need to do to enable secure communication server-side.
@@ -149,7 +149,7 @@ The secure client is similar to the secure server. The only difference is in how
149149
void Start ()
150150
{
151151
var settings = new NetworkSettings();
152-
settings.WithSecureServerParameters(
152+
settings.WithSecureClientParameters(
153153
serverName: SecureParameters.ServerCommonName,
154154
caCertificate: SecureParameters.MyGameClientCA);
155155
m_Driver = NetworkDriver.Create(settings);

0 commit comments

Comments
 (0)