- Home /
Check RPC is from Server
Is there any way to verify that an RPC method call received by a client comes from the server and not another client?
I am using C# as my scripting language.
@Nytrus, can you explain in detail your setup or at least enough to understand what type of server your using? You can peek at Network$$anonymous$$essageInfo and check the sender of the call if you want, you could technically check the IP, but if using RPC and unity out of the box, you won't see anything that indicates it's the server. $$anonymous$$ore info out be more helpful.
Thanks for replying. I'm creating an authoritative server in order to try and $$anonymous$$imise cheating and as part of that, when the server makes an RPC call to all the clients to relay the players' position's I want to make sure it's not another client attempting to call the method. Is their a constant variable on the client which I could check against the sender, perhaps? I'm using the default Unity networking if that helps.