Skip to content

Commit e77c109

Browse files
fix
Adding inheritdoc for the addition of OnOwnershipChanged. Making ChangeOwnershipRpc internal to avoid required XML API PVP check.
1 parent a1f5f6d commit e77c109

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

com.unity.netcode.gameobjects/Tests/Runtime/NetworkObject/NetworkObjectOwnershipTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,22 @@ public class NetworkObjectOwnershipComponent : NetworkBehaviour
1414
public bool OnLostOwnershipFired = false;
1515
public bool OnGainedOwnershipFired = false;
1616

17+
18+
/// <inheritdoc/>
1719
public override void OnLostOwnership()
1820
{
1921
OnLostOwnershipFired = true;
2022
}
2123

24+
25+
/// <inheritdoc/>
2226
public override void OnGainedOwnership()
2327
{
2428
OnGainedOwnershipFired = true;
2529
}
2630

31+
32+
/// <inheritdoc/>
2733
protected override void OnOwnershipChanged(ulong previous, ulong current)
2834
{
2935
Assert.True(previous != current, $"[{nameof(OnOwnershipChanged)}][Invalid Parameters] Invoked and the previous ({previous}) equals the current ({current})!");
@@ -37,7 +43,7 @@ public void ResetFlags()
3743
}
3844

3945
[Rpc(SendTo.Server)]
40-
public void ChangeOwnershipRpc(RpcParams rpcParams = default)
46+
internal void ChangeOwnershipRpc(RpcParams rpcParams = default)
4147
{
4248
NetworkObject.ChangeOwnership(rpcParams.Receive.SenderClientId);
4349
}

0 commit comments

Comments
 (0)