- Home /
[UNet] How I can send Command to non-player object?
Hello, I read in documentation this: "Commands can only be sent from YOUR player object, so you cannot control the objects of other players.", but I need to send request for game-pause from client PauseManager to server PauseManager. How can I do that?
Answer by n1gth · Jul 13, 2015 at 01:00 PM
You could keep a reference to your player in PauseManager, then just call a method on it, which does the Command.
Yes, the pause manager on the client calls a method on the Player o the same client. This could then call a Command annotated method to do what it needs to do on the server.
Your answer
Follow this Question
Related Questions
Change variable on all players with UNet 1 Answer
[UNet] How to use BroadcastDiscovery? 0 Answers
Can't call command from client 1 Answer
Can I use Rpc Calls and Commands on the same object? 0 Answers
UNET Server not setting [SyncVar] 0 Answers