Struct data does not get replicated

Looks like you are using TMaps, which afaik still do not support replication.

You can work your way around either by :

  • Replacing your Maps with Arrays of structs, including the key in the struct. Then when you need to find items by key you have to iterate the array. It is allegedly less optimal, but in practice iterating an array isn’t really slower than hashing the key, until you reach a certain amount of elements (around 50 according to other posts).

  • Move your structs to C++, where you can write custom serialization code to include TMap contents (search for NetSerialize / NetDeltaSerialize). Delta serialization might be difficult to achieve though. If you end up sending the whole map every time, it could impact network performance.

2 Likes