I wanted to know the method possible to call a Server RPC with a callback function.
I know Delegates do this, but you cant have a delegate within an RPC function. So i tried to pass a Self reference, and thats not helpful either.
Is there a way to easily return a value from an RPC back to the caller? ie, a success bool?
What about passing a reference to a function as one of the parameters? is there a way to simply call the function once the RPC is done with it’s logic? its really hard to program networking events if you never know if the server actually successfully did its job
RPCs are mostly fire and forget (except for the case where they are immediately called locally). That’s also why they cannot have reference parameters or return values. You’d need to send a response RPC from the server back to the client. Or rely on whatever replicated state properties you have to eventually reach the client if that’s sufficient.
Its unfortunately not sufficient. Ive decided that because RPCs can call other functions and switch them to a server state, i can daisy chain them together