Skip to content

Commit 3863794

Browse files
authored
fix: Improve API doc for OnGainedOwnership and OnLostOwnership (#2996)
1 parent dbf6b03 commit 3863794

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

com.unity.netcode.gameobjects/Runtime/Core/NetworkBehaviour.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ internal void InternalOnNetworkDespawn()
758758
}
759759

760760
/// <summary>
761-
/// Gets called when the local client gains ownership of this object
761+
/// Invoked on both the server and the local client of the owner when <see cref="Netcode.NetworkObject"/> ownership is assigned.
762762
/// </summary>
763763
public virtual void OnGainedOwnership() { }
764764

@@ -786,7 +786,8 @@ internal void InternalOnOwnershipChanged(ulong previous, ulong current)
786786
}
787787

788788
/// <summary>
789-
/// Gets called when we loose ownership of this object
789+
/// Invoked on the local client when it loses ownership of the associated <see cref="Netcode.NetworkObject"/>.
790+
/// This method is also invoked on the server when any client loses ownership.
790791
/// </summary>
791792
public virtual void OnLostOwnership() { }
792793

0 commit comments

Comments
 (0)