Skip to content

Commit f68138d

Browse files
author
FirstGearGames
committed
4.6.18R
- Fixed parent NetworkBehaviour finding error during serialization. - Fixed NullReferenceException when a NetworkObject was being automatically added during serialization. - Fixed TickSmootherController incorrectly calling OnUpdate when OnPreTick was intended, breaking smooting components.
1 parent 7e334cb commit f68138d

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

Assets/FishNet/Runtime/Generated/Component/TickSmoothing/TickSmootherController.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public class TickSmootherController : IResettable
6262
/// True if initialized.
6363
/// </summary>
6464
private bool _isInitialized;
65-
6665
private static readonly ProfilerMarker _pm_OnUpdate = new("TickSmootherController.TimeManager_OnUpdate()");
6766
private static readonly ProfilerMarker _pm_OnPreTick = new("TickSmootherController.TimeManager_OnPreTick()");
6867
private static readonly ProfilerMarker _pm_OnPostTick = new("TickSmootherController.TimeManager_OnPostTick()");
@@ -155,7 +154,7 @@ public void TimeManager_OnPreTick()
155154
{
156155
using (_pm_OnPreTick.Auto())
157156
{
158-
UniversalSmoother.OnUpdate(Time.deltaTime);
157+
UniversalSmoother.OnPreTick();
159158
}
160159
}
161160

Assets/FishNet/Runtime/Managing/NetworkManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ internal void SetBroadcastName<T>(ushort key) where T : struct, IBroadcast
232232
/// <summary>
233233
/// Version of this release.
234234
/// </summary>
235-
public const string FISHNET_VERSION = "4.6.17";
235+
public const string FISHNET_VERSION = "4.6.18";
236236
/// <summary>
237237
/// Maximum framerate allowed.
238238
/// </summary>

Assets/FishNet/Runtime/Object/NetworkBehaviour/NetworkBehaviour.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private NetworkObject TryAddNetworkObject()
250250
else
251251
{
252252
_addedNetworkObject = transform.root.gameObject.AddComponent<NetworkObject>();
253-
NetworkManager.Log($"Script {GetType().Name} on object {gameObject.name} added a NetworkObject component to {transform.root.name}.");
253+
NetworkManagerExtensions.Log($"Script {GetType().Name} on object {gameObject.name} added a NetworkObject component to {transform.root.name}.");
254254
}
255255

256256
AlertToDuplicateNetworkObjects(_addedNetworkObject.transform);

Assets/FishNet/Runtime/Object/NetworkObject/NetworkObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ internal void SetInitializedValues(NetworkObject parentNob, ref byte componentId
935935
* identify its parent properly. */
936936
TryAddEmptyNetworkBehaviour(parentNob, addToNetworkBehaviours: true, out _);
937937

938-
if (!transform.parent.TryGetComponent(out NetworkBehaviour parentNb))
938+
if (!parentNob.TryGetComponent(out NetworkBehaviour parentNb))
939939
NetworkManager.LogError($"A NetworkBehaviour is expected to exist on {parentNob.name} but does not.");
940940
else
941941
InitializedParentNetworkBehaviour = parentNb;

Assets/FishNet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.firstgeargames.fishnet",
3-
"version": "4.6.17",
3+
"version": "4.6.18",
44
"displayName": "FishNet: Networking Evolved",
55
"description": "A feature-rich Unity networking solution aimed towards reliability, ease of use, efficiency, and flexibility.",
66
"unity": "2021.3",

0 commit comments

Comments
 (0)