Skip to content

Commit a038711

Browse files
update
Adjusting the NotMeRpcTarget for distributed authority mode.
1 parent 2aa38ce commit a038711

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

com.unity.netcode.gameobjects/Runtime/Messaging/RpcTargets/NotMeRpcTarget.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ internal override void Send(NetworkBehaviour behaviour, ref RpcMessage message,
4949
{
5050
continue;
5151
}
52-
if (clientId == NetworkManager.ServerClientId)
52+
// In distributed authority mode, we send to target id 0 (which would be a DAHost) via the group
53+
if (clientId == NetworkManager.ServerClientId && !m_NetworkManager.DistributedAuthorityMode)
5354
{
5455
continue;
5556
}
@@ -58,10 +59,8 @@ internal override void Send(NetworkBehaviour behaviour, ref RpcMessage message,
5859
}
5960
m_GroupSendTarget.Target.Send(behaviour, ref message, delivery, rpcParams);
6061

61-
// In distributed authority mode, we don't need to send to the server identifier
62-
// DANGO-TODO: Adding this causes UniversalRpc tests to fail.
63-
// Get with Kitty to figure out the best way to update the UniversalRpc Tests for this update
64-
if (!behaviour.IsServer)// && !m_NetworkManager.DistributedAuthorityMode)
62+
// In distributed authority mode, we don't use ServerRpc
63+
if (!behaviour.IsServer && !m_NetworkManager.DistributedAuthorityMode)
6564
{
6665
m_ServerRpcTarget.Send(behaviour, ref message, delivery, rpcParams);
6766
}

testproject/ProjectSettings/ProjectSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ PlayerSettings:
1717
defaultCursor: {fileID: 0}
1818
cursorHotspot: {x: 0, y: 0}
1919
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
20-
m_ShowUnitySplashScreen: 0
20+
m_ShowUnitySplashScreen: 1
2121
m_ShowUnitySplashLogo: 1
2222
m_SplashScreenOverlayOpacity: 1
2323
m_SplashScreenAnimation: 1

0 commit comments

Comments
 (0)