Download

Passing a pointer to Server Function?

Hi all,

I am new to UE4 and I am working on a networked pickup system.
I am very concerned about cheating and UE4 comes with the great WithValidation tag, but in most courses and tutorials most everyone just returns true.

When I pass a pointer of an object to a server function, how/what is received by the server?
Could the pointer be maliciously crafted to appear to be a different item, etc?

I am having a bit of trouble with the system because the server is not 100% in sync with the client it will sometimes throw a false positive and kick the player for cheating.

If the object is replicated (and thus the server knows of it), then, it’ll swap your client pointer for a pointer to that object. It boils down to sending an Object ID which the server then looks up and re-creates the pointer from. However, note any non-replicated properties on that object will not be the same as the client.

1 Like