Skip to content

Commit c4ec49b

Browse files
committed
Reset NetworkSpawnManager
1 parent 97365a9 commit c4ec49b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -526,14 +526,9 @@ internal void ChangeOwnership(NetworkObject networkObject, ulong clientId, bool
526526
}
527527
else if (!isAuthorized)
528528
{
529-
if (NetworkManager.LogLevel <= LogLevel.Error)
530-
{
531-
NetworkLog.LogError($"Only the server can change ownership! (ignoring)");
532-
return;
533-
}
529+
throw new NotServerException("Only the server can change ownership");
534530
}
535531

536-
//Should this go at the beginning of the function?
537532
if (!networkObject.IsSpawned)
538533
{
539534
throw new SpawnStateException("Object is not spawned");

0 commit comments

Comments
 (0)