You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+1-7Lines changed: 1 addition & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,21 +10,17 @@ Additional documentation and release notes are available at [Multiplayer Documen
10
10
11
11
### Added
12
12
13
-
- Added a `Set` function onto `NetworkList` that takes an optional parameter that forces an update to be processed even if the current value is equal to the previous value. (#3690)
- Clicking on the Help icon in the inspector will now redirect to the relevant documentation. (#3663)
16
-
-`NetworkSceneManager` as an internal wrapper for the `SceneManager.Scene.handle` and swapped all places that use an `int` to represent a `Scene.handle` to instead use the `NetworkSceneManager`. (#3647)
17
14
18
15
### Changed
19
16
20
17
- The `NetworkManager` functions `GetTransportIdFromClientId` and `GetClientIdFromTransportId` will now return `ulong.MaxValue` when the clientId or transportId do not exist. (#3707)
21
-
- Improved performance of the NetworkVariable. (#3683)
22
-
- Improved performance around the NetworkBehaviour component. (#3687)
23
18
- Changed NetworkShow to send a message at the end of the frame and force a NetworkVariable synchronization prior to generating the CreateObjectMessage as opposed to waiting until the next network tick to synchronize the show with the update to NetworkVariables. (#3664)
24
19
- Changed NetworkTransform now synchronizes `NetworkTransform.SwitchTransformSpaceWhenParented` when it is updated by the motion model authority. (#3664)
25
20
- Changed when NetworkObjects pending to be shown to clients can now occur on partial network ticks. If any pending NetworkObjects pending to be shown to clients happens to be ready on a new network tick they still are shown after network variable deltas have been processed. (#3664)
26
21
- Changed the default `NetworkDelivery` used by all messages is now reliable fragmented sequenced with the exception of named, unnamed, and any messages sent with a user specified network delivery type. This assures certain order of operations to be preserved when same call-stack changes are applied to a newly spawned, authority side, NetworkObject. (#3664)
27
22
- Changed NetworkTransform documentation to better reflect the Teleport methods intended usage along with updates to NetworkObject and physics areas of the documentation. (#3664)
23
+
- The first session owner no longer sends two synchronization messages to the service. (#3563)
28
24
29
25
### Deprecated
30
26
@@ -35,8 +31,6 @@ Additional documentation and release notes are available at [Multiplayer Documen
35
31
### Fixed
36
32
37
33
- Multiple disconnect events from the same transport will no longer disconnect the host. (#3707)
38
-
- Distributed authority clients no longer send themselves in the `ClientIds` list when sending a `ChangeOwnershipMessage`. (#3687)
39
-
- Made a variety of small performance improvements. (#3683)
40
34
- Fixed NetworkTransform state synchronization issue when `NetworkTransform.SwitchTransformSpaceWhenParented` is enabled and the associated NetworkObject is parented multiple times in a single frame or within a couple of frames. (#3664)
41
35
- Fixed issue when spawning, parenting, and immediately re-parenting when `NetworkTransform.SwitchTransformSpaceWhenParented` is enabled. (#3664)
42
36
- Fixed issue where the disconnect event and provided message was too generic to know why the disconnect occurred. (#3551)
`Start` | `Start` (invoked when disabled NetworkBehaviour components are enabled)
68
68
69
-
> [!NOTE] Parenting, inactive GameObjects, and NetworkBehaviour components
69
+
> [!NOTE]
70
+
> Parenting, inactive GameObjects, and NetworkBehaviour components<br />
70
71
> If you have child GameObjects that are not active in the hierarchy but are nested under an active GameObject with an attached NetworkObject component, then the inactive child GameObjects will not be included when the NetworkObject is spawned. This applies for the duration of the NetworkObject's spawned lifetime. If you want all child NetworkBehaviour components to be included in the spawn process, then make sure their respective GameObjects are active in the hierarchy before spawning the NetworkObject. Alternatively, you can just disable the NetworkBehaviour component(s) individually while leaving their associated GameObject active.
71
72
> It's recommended to disable a NetworkBehaviour component rather than the GameObject itself.
72
73
@@ -165,7 +166,8 @@ Each NetworkBehaviour has a virtual `OnDestroy` method that you can override to
165
166
}
166
167
```
167
168
168
-
> [!NOTE] Destroying the GameObject
169
+
> [!NOTE]
170
+
> Destroying the GameObject<br />
169
171
> When destroying a NetworkObject from within an associated NetworkBehaviour component script, you should always destroy the `NetworkObject.gameObject` and not the `NetworkBehaviour.gameObject` in case the NetworkBehaviour is located on a child GameObject nested under the NetworkObject's GameObject.
To spawn NetworkObjects with ownership use the following:
44
+
To spawn a `NetworkObject` that is [owned](../../terms-concepts/ownership.md) by a different game client than the one doing the spawning, use the following:
> When using the `SpawnWithOwnership` method, be aware that any component that has owner-specific checks to perform specific actions won't be invoked on the spawn authority side during the spawn sequence. The spawn authority is the server when using a client-server network topology, and can be any client when using a distributed authority network topology. Using `SpawnWithOwnership` can impact things like [NetworkTransform](../helper/networktransform.md) when using an owner authority motion model, and potentially provide undesired parenting artifacts and/or impact your own scripts if you are planning to have the spawn authority make any further post-spawn adjustments within the same frame.
51
-
> To avoid potential issues, it's recommended to use `Spawn`, where the spawn authority starts as the owner throughout the spawn sequence, makes adjustments post-spawn, and then immediately follow with a call to `ChangeOwnership`.
50
+
> The `SpawnWithOwnership` method allows a game client to spawn an object that it doesn't own. This means any owner-specific checks during the spawn sequence will not be invoked on the spawn authority side. Using `SpawnWithOwnership` can result in unexpected behavior if the spawn authority makes any additional post-spawn adjustments within the same frame.
51
+
> To avoid potential issues, it's recommended to use `Spawn` if the spawn authority needs to make any adjustments post-spawn. After adjusting, the spawn authority can immediately follow with a call to `ChangeOwnership`.
52
52
53
53
To change ownership, use the `ChangeOwnership` method:
54
54
@@ -62,7 +62,7 @@ To give ownership back to the server use the `RemoveOwnership` method:
62
62
GetComponent<NetworkObject>().RemoveOwnership();
63
63
```
64
64
> [!NOTE]
65
-
> Using `RemoveOwnership`in a distributed authority network topology isn't recommended.
65
+
> `RemoveOwnership`isn't supported when using a [distributed authority network topology](../../terms-concepts/distributed-authority.md).
66
66
67
67
68
68
To see if the local client is the owner of a NetworkObject, you can check the [`NetworkBehaviour.IsOwner`](https://docs.unity3d.com/Packages/com.unity.netcode.gameobjects@latest?subfolder=/api/Unity.Netcode.NetworkBehaviour.IsOwner.html) property.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Documentation~/components/helper/networkanimator.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,5 +121,6 @@ public void SetPlayerJumping(bool isJumping)
121
121
}
122
122
```
123
123
124
-
> [!NOTE] Changing meshes
124
+
> [!NOTE]
125
+
> Changing meshes<br/>
125
126
> When swapping a skinned mesh with another reparented skinned mesh, you can invoke the `Rebind ` method on the `Animator` components: `Animator.Rebind()`.
/// Only works with <see cref="NetworkTransform"/> components that are not paired with a <see cref="NetworkRigidbody"/> or <see cref="NetworkRigidbody2D"/> component that is configured to use the rigid body for motion.<br />
1517
1517
/// <see cref="TickSyncChildren"/> will automatically be set when this is enabled.
1518
-
/// This field is auto-synchronize with non-authority clients if changed by the authority instance.
1518
+
/// This field is auto-synchronized with non-authority clients when changed by the authority instance.
1519
1519
/// </remarks>
1520
1520
[Tooltip("When enabled, NetworkTransform controls world or local space settings while also providing smooth parenting transitions."+
1521
1521
"When disabled, world or local space settings have to be adjusted by script or in the inspector view.")]
0 commit comments