Hi! FastArraySerializer has DeltaSerialize on each array element, but I can’t seem to enable DeltaSerialize within the FFastArraySerializerItem structure itself. Even though it seems like it should work out of the box. I tested it with Unreal Insight, and it makes absolutely no difference whether I change one field in FFastArraySerializerItem or forty… the traffic is the same. Maybe something else needs to be done to make this happen? So that FFastArraySerializerItem actually has DeltaSerialize on each field.
yeah i dont think you can have both, you’re using delta on the array so it only updates the one item, not delta on the item to udpate one field.
likely because FastArrayItems are special and even when changing a field it would need its RepID etc
could be wrong but thats efficient enough
FastArraySerializer is used to replicate only delta in array changes itself, so if you have 10 items and you add one item, it will only replicate an action of adding that one item, instead of replicating 11 items being in the array.
If you want structs/classes to replicate only changed variables (delta serializing the properties of a struct/class), then unreal is already doing that by default, unless you override NetSerialize function.
Yes, I wrote that each element at the array level is replicated by delta. The question was how to make Unreal replicate each field within an FFastArraySerializerItem by delta as well. Because according to my tests, if I change an already added FFastArraySerializerItem (change is called on the client), the full state of this FFastArraySerializerItem is sent from the server. That is, if it has 10 int32 fields, and only one has changed, then all 10 fields for a specific FFastArraySerializerItem will be sent over the network. At least in unreal insights, there is no difference in the size of the sent packets when changing one field or ten. And their size corresponds to the size of the FFastArraySerializerItem.
Oh, I understand now. I’m not sure then.. If you didn’t add NetSerialize for your struct, it should work fine.
What’s the size of a packet in Unreal Insights? Maybe it’s only showing one property every time as changing few properties doesn’t guarantee that they will be sent at the same time.