If I have an actor that is set to replicated, and i use a server RPC to update a property on that actor,
Do i need to set the property to Replicated or ReplicatedUsing for it to reflect on the client? or are those used for showing other connected clients.
Only the client who sends the RPC needs to know about it (its an inventory item)
Currently have an RPC updating the inventory and its reflected on the server but its currently not updating the clients property (TArray) - its a component owned by an actor and its running the RPC fine. just not updating the client local property.
I have attmpted setting the property to replicated, replicatedUsing and also nothing at all.
It never reflects on the client.
SOLUTION From video, I was unaware that the replicate using could pass back the new value, I figured it would just auto sync.
Have you bound the delegate inside of your inventory widget?
Put a breakpoint at OnInventoryUpdated.Broadcast(); and see if it is called.
Oh and one thing to know about onrepnotify => it’s only called on the clients.
If you have a listen server and want to update there then you need to call the function manually (best to put an authority check before to see if you are on the server first)
As for only running on the client that should be fine. its only meant for the client to know about (since the RPC should update the server version even if listen server)