Skip to content

Commit 06858a8

Browse files
committed
Fix wrong DAHost check on network hide and show
1 parent 1b42bc0 commit 06858a8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ public void NetworkShow(ulong clientId)
14911491
return;
14921492
}
14931493

1494-
if (!HasAuthority && !NetworkManagerOwner.DAHost)
1494+
if (!HasAuthority)
14951495
{
14961496
if (NetworkManagerOwner.DistributedAuthorityMode)
14971497
{
@@ -1505,7 +1505,7 @@ public void NetworkShow(ulong clientId)
15051505
{
15061506
if (NetworkManagerOwner.LogLevel <= LogLevel.Error)
15071507
{
1508-
NetworkLog.LogError($"[{name}] Only the authority can change visibility!");
1508+
NetworkLog.LogError($"[{name}] Only the server can change visibility!");
15091509
}
15101510
return;
15111511
}
@@ -1586,7 +1586,7 @@ public void NetworkHide(ulong clientId)
15861586
return;
15871587
}
15881588

1589-
if (!HasAuthority && !NetworkManagerOwner.DAHost)
1589+
if (!HasAuthority)
15901590
{
15911591
if (NetworkManagerOwner.DistributedAuthorityMode)
15921592
{
@@ -1600,7 +1600,7 @@ public void NetworkHide(ulong clientId)
16001600
{
16011601
if (NetworkManagerOwner.LogLevel <= LogLevel.Error)
16021602
{
1603-
NetworkLog.LogError($"[{name}] Only the authority can change visibility!");
1603+
NetworkLog.LogError($"[{name}] Only the server can change visibility!");
16041604
}
16051605
return;
16061606
}

0 commit comments

Comments
 (0)