Hi, I am working on a inventory, my current setup is using replicated UObjects for equipped items and inventory, i have an array of equipment slots, which hold equipped items, replicated to all so on OnRep i can change visible meshes etc, but i want most items to be able to hold other items, like a backpack or just attachments.
My issue is that with a replicated array, it would need to replicate all items in equipment, and all sub-items it holds (items in backpack or attachments) on a single change. so i was thinking of switching to use RPC’s for change requests, but then the issue is for late joining clients, or other players who where just not network relevant when the RPC happened.
Is there a method to somehow bind a “OnNetworlRelevancyChanged” for each player to update the full state, like a replicated array would for new joining players?
Any ideas or pointers would be greatly appreciated.
PS: the reason i went for replicated UObjects rather than a simple struct is that most items are pretty dynamic, with properties that change, like condition, and i have not yet fleshed it out but i was thinking of having several item subclasses, one with attachments which are replicated to all because they need to be visible, and another with a inventory which is only replicated back to owning client for stuff like backpacks, or subitems that are not visible to all.