Skip to content

Commit 2cc2cca

Browse files
fixing infinite loop issue with RPC example (#794)
Since the Host is both a client and server and the server invokes RPCs locally, this was causing an infinite loop issue. Co-authored-by: Christopher Pope <[email protected]>
1 parent e5c258e commit 2cc2cca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tutorials/goldenpath_series/gp_module_two.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public class RpcTest : NetworkBehaviour
179179
{
180180
public override void OnNetworkSpawn()
181181
{
182-
if (IsClient)
182+
if (!IsServer)
183183
{
184184
TestServerRpc(0);
185185
}
@@ -237,4 +237,4 @@ See the following content to continue your journey using Netcode:
237237
* [Boss Room](../../learn/bossroom/getting-started-boss-room.md)
238238
* [2D Spaceshooter Bitesize Sample](../../learn/bitesize/bitesize-spaceshooter.md)
239239
* [Invaders Bitesize Sample](../../learn/bitesize/bitesize-invaders.md)
240-
* [Client-Driven Bitesize Sample](../../learn/bitesize/bitesize-clientdriven.md)
240+
* [Client-Driven Bitesize Sample](../../learn/bitesize/bitesize-clientdriven.md)

0 commit comments

Comments
 (0)