From e10ab75bf511c0578ed38d3b771173d4cc725868 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Sat, 20 Jan 2024 04:46:29 -0500 Subject: [PATCH] fix(InterestManagement): Separate ResetState (#3743) * fix(InterestManagement): Separate ResetState We should not have hijacked Unity's callback for runtime resets. * Updated Template --- .../InterestManagement/Distance/DistanceInterestManagement.cs | 2 +- .../SpatialHashing/SpatialHashingInterestManagement.cs | 2 +- Assets/Mirror/Core/InterestManagementBase.cs | 2 +- Assets/Mirror/Core/NetworkServer.cs | 4 ++-- ...Custom Interest Management-CustomInterestManagement.cs.txt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Mirror/Components/InterestManagement/Distance/DistanceInterestManagement.cs b/Assets/Mirror/Components/InterestManagement/Distance/DistanceInterestManagement.cs index 044155877..654996191 100644 --- a/Assets/Mirror/Components/InterestManagement/Distance/DistanceInterestManagement.cs +++ b/Assets/Mirror/Components/InterestManagement/Distance/DistanceInterestManagement.cs @@ -25,7 +25,7 @@ int GetVisRange(NetworkIdentity identity) } [ServerCallback] - public override void Reset() + public override void ResetState() { lastRebuildTime = 0D; CustomRanges.Clear(); diff --git a/Assets/Mirror/Components/InterestManagement/SpatialHashing/SpatialHashingInterestManagement.cs b/Assets/Mirror/Components/InterestManagement/SpatialHashing/SpatialHashingInterestManagement.cs index 298603497..066a1c5ee 100644 --- a/Assets/Mirror/Components/InterestManagement/SpatialHashing/SpatialHashingInterestManagement.cs +++ b/Assets/Mirror/Components/InterestManagement/SpatialHashing/SpatialHashingInterestManagement.cs @@ -72,7 +72,7 @@ public override void OnRebuildObservers(NetworkIdentity identity, HashSet [ServerCallback] - public override void Reset() { } + public override void ResetState() { } [ServerCallback] void Update()