diff --git a/Assets/Mirror/Runtime/NetworkBehaviour.cs b/Assets/Mirror/Runtime/NetworkBehaviour.cs index 7951bac9a..a808e6d17 100644 --- a/Assets/Mirror/Runtime/NetworkBehaviour.cs +++ b/Assets/Mirror/Runtime/NetworkBehaviour.cs @@ -736,12 +736,6 @@ internal void ResetSyncObjects() } } - /// - /// This is invoked on clients when the server has caused this object to be destroyed. - /// This can be used as a hook to invoke effects or do client specific cleanup. - /// - public virtual void OnStopClient() { } - /// /// This is invoked for NetworkBehaviour objects when they become active on the server. /// This could be triggered by NetworkServer.Listen() for objects in the scene, or by NetworkServer.Spawn() for objects that are dynamically created. @@ -761,6 +755,12 @@ public virtual void OnStopServer() { } /// public virtual void OnStartClient() { } + /// + /// This is invoked on clients when the server has caused this object to be destroyed. + /// This can be used as a hook to invoke effects or do client specific cleanup. + /// + public virtual void OnStopClient() { } + /// /// Called when the local player object has been set up. /// This happens after OnStartClient(), as it is triggered by an ownership message from the server. This is an appropriate place to activate components or functionality that should only be active for the local player, such as cameras and input.