Replicated actor passed to a multicast RPC function is null on clients
Seeing a strange issue that I think may be to do with actor replication over a network.
In this scenario, clients will equip items - this involves making a call to the server to spawn the item, a pointer to that item object is then passed to a multicast function so that clients may set variables that are relevant to them based on the actor in question.
Unfortunately, after the actor has been spawned, and a point to it is passed as a parameter to the multicast function, it comes out as NULL on the client side.
Here is a quick code snippet:
The first line is quite verbose but essentially it just spawns an actor in the world using UWorld->SpawnActor.
The last line then just calls the multicast RPC function from the server - but when I step through, itemActor comes out as a null pointer.
Is this to do with the item not yet being replicated at this point? Is there another way to resolve this issue, perhaps by making the replication instant?
asked May 28 '18 at 07:32 PM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here