Recall & Review
beginner
What is a Remote Procedure Call (RPC) in Unity?
An RPC in Unity is a way to call a function on another computer or player over the network, making multiplayer games work smoothly.
Click to reveal answer
beginner
How do you mark a method as an RPC in Unity's networking system?
You mark a method with the
[PunRPC] attribute when using Photon, or use [ClientRpc] in Unity's Netcode for GameObjects to indicate it can be called remotely.Click to reveal answer
intermediate
What is the difference between a ClientRpc and a Command in Unity networking?
A Command is called by a client to run code on the server, while a ClientRpc is called by the server to run code on clients.
Click to reveal answer
intermediate
Why should RPCs be used carefully in multiplayer games?
Because RPCs send data over the network, using too many or large RPCs can cause lag or slow down the game experience.
Click to reveal answer
beginner
Give an example of a simple RPC method in Unity using Photon.
Example:<br>
[PunRPC]
void Jump() {
// Make the player jump
}Click to reveal answer
What does an RPC do in Unity multiplayer games?
✗ Incorrect
RPCs let you run code on other players' computers or the server, enabling multiplayer interaction.
Which attribute is used to mark a method as an RPC in Photon Unity Networking?
✗ Incorrect
Photon uses [PunRPC] to mark methods that can be called remotely.
In Unity's Netcode for GameObjects, what does a ClientRpc do?
✗ Incorrect
ClientRpc methods are called by the server to execute code on all or specific clients.
Why should you limit the number of RPC calls in your game?
✗ Incorrect
Excessive RPC calls increase network traffic and can cause lag.
Which of these is NOT a typical use of RPCs in Unity multiplayer?
✗ Incorrect
Loading local assets is done locally, not via RPCs.
Explain how Remote Procedure Calls help multiplayer games in Unity work.
Think about how players see each other's actions in real time.
You got /3 concepts.
Describe the difference between ClientRpc and Command in Unity networking.
Who calls whom in each case?
You got /3 concepts.