I’m headaching for 6 days understanding unreal multiplayer and came across something that I don’t understand and could use a hand.
I did the Compendium (http://cedric-neukirchen.net/Downloads/Compendium/UE4_Network_Compendium_by_Cedric_eXi_Neukirchen.pdf) and Unreal docs and tests.
Issue is the Server-RPC, which executes on the server if it is called from an actor that is owned by the client. Compendium Page 59.4
At Spawn I check the owner which results in none ( GetOwner() ). 1 Server, 2 Clients.
1 Server output is missing in the image, its far further up.
Then I execute:
which results in:
Why does the Server-RPC work? There is no owner. As there is no owner, OwningClient-RPC should not work either.
To check this, I do the same within the spawned actor “BP_RepActor”
RepActor: (NO OWNER)
Which executes as expected. There is no owner of the actor set, the Server-RPC cannot execute and thus only Stage1 is printed.
When setting the owner to the clients PlayerController on spawn (within the player), the code will execute with Stage1, Stage2, Stage3.
Can anyone help out? What exactly is checked when Server-RPC/OwningClient-RPC are called. It seems it is not only the owner.