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
* chore
Add unique message when invoking NetworkConnectionManager.DisconnectClient while in a distributed authority session.
* fix
Make the NetworkTransformEditor use NetworkTransform as the base type so it doesn't show a foldout group when using a non-derived component.
* fix
Adding ToolTips to NetworkObject (MTTB-184)
* fix
Just log a warning when developer logging is enabled if a client or server receives a universal RPC message for a NetworkObject that does not exist.
* fix
Making NetworkAnimator.Awake a protected and virtual method.
* style
removing using directive.
* update
Adding changelog entries.
* style
updating XML API documentation for `NetworkTransform.Teleport`
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
10
10
11
11
### Added
12
12
13
+
- Added tooltips for all of the `NetworkObject` component's properties. (#3052)
13
14
- Added message size validation to named and unnamed message sending functions for better error messages. (#3049)
14
15
- Added "Check for NetworkObject Component" property to the Multiplayer->Netcode for GameObjects project settings. When disabled, this will bypass the in-editor `NetworkObject` check on `NetworkBehaviour` components. (#3031)
15
16
- Added `NetworkTransform.SwitchTransformSpaceWhenParented` property that, when enabled, will handle the world to local, local to world, and local to local transform space transitions when interpolation is enabled. (#3013)
@@ -20,6 +21,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
20
21
21
22
### Fixed
22
23
24
+
- Fixed issue where an exception could occur when receiving a universal RPC for a `NetworkObject` that has been despawned. (#3052)
23
25
- Fixed issue where a NetworkObject hidden from a client that is then promoted to be session owner was not being synchronized with newly joining clients.(#3051)
24
26
- Fixed issue where clients could have a wrong time delta on `NetworkVariableBase` which could prevent from sending delta state updates. (#3045)
25
27
- Fixed issue where setting a prefab hash value during connection approval but not having a player prefab assigned could cause an exception when spawning a player. (#3042)
@@ -30,6 +32,9 @@ Additional documentation and release notes are available at [Multiplayer Documen
30
32
31
33
### Changed
32
34
35
+
- Changed `NetworkTransformEditor` now uses `NetworkTransform` as the base type class to assure it doesn't display a foldout group when using the base `NetworkTransform` component class. (#3052)
36
+
- Changed `NetworkAnimator.Awake` is now a protected virtual method. (#3052)
37
+
- Changed when invoking `NetworkManager.ConnectionManager.DisconnectClient` during a distributed authority session a more appropriate message is logged. (#3052)
33
38
- Changed `NetworkTransformEditor` so it now derives from `NetcodeEditorBase`. (#3013)
34
39
- Changed `NetworkRigidbodyBaseEditor` so it now derives from `NetcodeEditorBase`. (#3013)
35
40
- Changed `NetworkManagerEditor` so it now derives from `NetcodeEditorBase`. (#3013)
/// Teleport the transform to the given values without interpolating
3607
+
/// Teleport an already spawned object to the given values without interpolating.
3608
3608
/// </summary>
3609
+
/// <remarks>
3610
+
/// This is intended to be used on already spawned objects, for setting the position of a dynamically spawned object just apply the transform values prior to spawning. <br />
3611
+
/// With player objects, override the <see cref="OnNetworkSpawn"/> method and have the authority make adjustments to the transform prior to invoking base.OnNetworkSpawn.
3612
+
/// </remarks>
3609
3613
/// <param name="newPosition"></param> new position to move to.
3610
3614
/// <param name="newRotation"></param> new rotation to rotate to.
3611
3615
/// <param name="newScale">new scale to scale to.</param>
thrownewNotServerException($"Only server can disconnect remote clients. Please use `{nameof(Shutdown)}()` instead.");
1305
+
}
1306
+
else
1307
+
{
1308
+
Debug.LogWarning($"Currently, clients cannot disconnect other clients from a distributed authority session. Please use `{nameof(Shutdown)}()` instead.");
/// If true, the object will always be replicated as root on clients and the parent will be ignored.
940
940
/// </summary>
941
+
[Tooltip("If enabled (default disabled), instances of this NetworkObject will ignore any parent(s) it might have and replicate on clients as the root being its parent.")]
/// bandwidth cost. This can also be useful for UI elements that have
956
957
/// a predetermined fixed position.
957
958
/// </remarks>
959
+
[Tooltip("If enabled (default enabled), newly joining clients will be synchronized with the transform of the associated GameObject this component is attached to. Typical use case"+
960
+
" scenario would be for managment objects or in-scene placed objects that don't move and already have their transform settings applied within the scene information.")]
958
961
publicboolSynchronizeTransform=true;
959
962
960
963
/// <summary>
@@ -1012,6 +1015,7 @@ public void SetSceneObjectStatus(bool isSceneObject = false)
1012
1015
/// To synchronize clients of a <see cref="NetworkObject"/>'s scene being changed via <see cref="SceneManager.MoveGameObjectToScene(GameObject, Scene)"/>,
1013
1016
/// make sure <see cref="SceneMigrationSynchronization"/> is enabled (it is by default).
1014
1017
/// </remarks>
1018
+
[Tooltip("When enabled (default disabled), spawned instances of this NetworkObject will automatically migrate to any newly assigned active scene.")]
1015
1019
publicboolActiveSceneSynchronization;
1016
1020
1017
1021
/// <summary>
@@ -1030,6 +1034,7 @@ public void SetSceneObjectStatus(bool isSceneObject = false)
1030
1034
/// is <see cref="true"/> and <see cref="ActiveSceneSynchronization"/> is <see cref="false"/> and the scene is not the currently
1031
1035
/// active scene, then the <see cref="NetworkObject"/> will be destroyed.
1032
1036
/// </remarks>
1037
+
[Tooltip("When enabled (default enabled), dynamically spawned instances of this NetworkObject's migration to a different scene will automatically be synchonize amongst clients.")]
1033
1038
publicboolSceneMigrationSynchronization=true;
1034
1039
1035
1040
/// <summary>
@@ -1045,7 +1050,7 @@ public void SetSceneObjectStatus(bool isSceneObject = false)
1045
1050
/// <summary>
1046
1051
/// When set to false, the NetworkObject will be spawned with no observers initially (other than the server)
1047
1052
/// </summary>
1048
-
[Tooltip("When false, the NetworkObject will spawn with no observers initially. (default is true)")]
1053
+
[Tooltip("When disabled (default enabled), the NetworkObject will spawn with no observers. You control object visibility using NetworkShow. This applies to newly joining clients as well.")]
1049
1054
publicboolSpawnWithObservers=true;
1050
1055
1051
1056
/// <summary>
@@ -1074,11 +1079,13 @@ public void SetSceneObjectStatus(bool isSceneObject = false)
1074
1079
/// Whether or not to destroy this object if it's owner is destroyed.
1075
1080
/// If true, the objects ownership will be given to the server.
1076
1081
/// </summary>
1082
+
[Tooltip("When enabled (default disabled), instances of this NetworkObject will not be destroyed if the owning client disconnects.")]
1077
1083
publicboolDontDestroyWithOwner;
1078
1084
1079
1085
/// <summary>
1080
1086
/// Whether or not to enable automatic NetworkObject parent synchronization.
1081
1087
/// </summary>
1088
+
[Tooltip("When disabled (default enabled), NetworkObject parenting will not be automatically synchronized. This is typically used when you want to implement your own custom parenting solution.")]
1082
1089
publicboolAutoObjectParentSync=true;
1083
1090
1084
1091
/// <summary>
@@ -1091,12 +1098,14 @@ public void SetSceneObjectStatus(bool isSceneObject = false)
1091
1098
/// When using a <see cref="NetworkTopologyTypes.ClientServer"/> network topology and an owner authoritative motion model, disabling this can help smooth parenting transitions.
1092
1099
/// When using a <see cref="NetworkTopologyTypes.DistributedAuthority"/> network topology this will have no impact on the owner's instance since only the authority/owner can parent.
1093
1100
/// </remarks>
1101
+
[Tooltip("When disabled (default enabled), the owner will not apply a server or host's transform properties when parenting changes. Primarily useful for client-server network topology configurations.")]
1094
1102
publicboolSyncOwnerTransformWhenParented=true;
1095
1103
1096
1104
/// <summary>
1097
1105
/// Client-Server specific, when enabled an owner of a NetworkObject can parent locally as opposed to requiring the owner to notify the server it would like to be parented.
1098
1106
/// This behavior is always true when using a distributed authority network topology and does not require it to be set.
1099
1107
/// </summary>
1108
+
[Tooltip("When enabled (default disabled), owner's can parent a NetworkObject locally without having to send an RPC to the server or host. Only pertinent when using client-server network topology configurations.")]
// With distributed authority mode, we can send Rpcs before we have been notified the NetworkObject is despawned.
38
-
// DANGO-TODO: Should the CMB Service cull out any Rpcs targeting recently despawned NetworkObjects?
39
-
// DANGO-TODO: This would require the service to keep track of despawned NetworkObjects since we re-use NetworkObject identifiers.
40
-
if(networkManager.DistributedAuthorityMode)
36
+
// If the NetworkObject no longer exists then just log a warning when developer mode logging is enabled and exit.
37
+
// This can happen if NetworkObject is despawned and a client sends an RPC before receiving the despawn message.
38
+
if(networkManager.LogLevel==LogLevel.Developer)
41
39
{
42
-
if(networkManager.LogLevel==LogLevel.Developer)
43
-
{
44
-
NetworkLog.LogWarning($"[{WrappedMessage.Metadata.NetworkObjectId}, {WrappedMessage.Metadata.NetworkBehaviourId}, {WrappedMessage.Metadata.NetworkRpcMethodId}]An RPC called on a {nameof(NetworkObject)} that is not in the spawned objects list. Please make sure the {nameof(NetworkObject)} is spawned before calling RPCs.");
45
-
}
46
-
return;
47
-
}
48
-
else
49
-
{
50
-
thrownewInvalidOperationException($"[{WrappedMessage.Metadata.NetworkObjectId}, {WrappedMessage.Metadata.NetworkBehaviourId}, {WrappedMessage.Metadata.NetworkRpcMethodId}]An RPC called on a {nameof(NetworkObject)} that is not in the spawned objects list. Please make sure the {nameof(NetworkObject)} is spawned before calling RPCs.");
40
+
NetworkLog.LogWarning($"[{WrappedMessage.Metadata.NetworkObjectId}, {WrappedMessage.Metadata.NetworkBehaviourId}, {WrappedMessage.Metadata.NetworkRpcMethodId}] An RPC called on a {nameof(NetworkObject)} that is not in the spawned objects list. Please make sure the {nameof(NetworkObject)} is spawned before calling RPCs.");
thrownewInvalidOperationException($"An RPC called on a {nameof(NetworkObject)} that is not in the spawned objects list. Please make sure the {nameof(NetworkObject)} is spawned before calling RPCs.");
63
+
// If the NetworkObject no longer exists then just log a warning when developer mode logging is enabled and exit.
64
+
// This can happen if NetworkObject is despawned and a client sends an RPC before receiving the despawn message.
65
+
if(networkManager.LogLevel==LogLevel.Developer)
66
+
{
67
+
NetworkLog.LogWarning($"[{metadata.NetworkObjectId}, {metadata.NetworkBehaviourId}, {metadata.NetworkRpcMethodId}] An RPC called on a {nameof(NetworkObject)} that is not in the spawned objects list. Please make sure the {nameof(NetworkObject)} is spawned before calling RPCs.");
0 commit comments