Hi all,
I was wondering if it is at all possible to pass UObject-derived custom classes as parameters to RPC functions.
I have various use cases where this is necessary: one example is an interface I have on classes that request animations on actors: they derive from a custom Interface with a “callback”, so that these objects can complete certain functions when an animations starts/completes. It is not possible to pass interfaces through, so it was suggested I pass a UObject and cast to the interface - however, the UObject always comes through null.
Another use case is that I have a custom UObject-derived class, UItem. When characters equip items, I want to make an RPC call passing the UItem through so that I can inform the server and then complete a range of logic on the server and client (update statistics, show new models, etc). However, whenever I pass it through, it always appears to be NULL afterwards.
Is there a way these objects should be passed via RPC? Is there a way to make UObjects not null? Should they be of another type?