RPC from client to server not working
So I have some actor spawned from the PlayerController, let's call that actor "CheatActor", and I would like to fire client RPCs to server, and it's not working.
From the RPC Doc, it says that
2.If the RPC is being called from client to be executed on the server, the client must own the Actor that the RPC is being called on.
I wrote the following code, they should satisfy those requirements:
And, the Cheat Actor is spawned in the PlayerController, which sets the Cheat Actor's owner to the PlayerController
Are these enough to setup RPC from a PlayerController spawned actor for client to server RPC? Why is the RPC still not working?
asked Mar 25 '17 at 01:41 AM in C++ Programming
1、Add a RPC to the playercontroller, for example, RPC_SpawnCheatActor(run on server, WithValidation) .
2、Call RPC_SpawnCheatActor in BeginPlay or other place.(Remember only call it on the client if you want to create the actor according to client input)
Follow this question
Once you sign in you will be able to subscribe for any updates here