The Gameplay Ability System provides a way to send client-predicted data to the Server via `UAbilitySystemComponent::ServerSetReplicatedTargetData`. This has been very helpful for us when creating Abilities with lots of predicted data.
The downside of this is that the predicted TargetData is saved in a map that is keyed off the `AbilitySpecHandle` and the `AbilityOriginalPredictionKey` -- NOT the scoped prediction key. This means that subsequent calls to `ServerSetReplicatedTargetData` from the same Ability will override each other in the map.
This is usually not an issue, and we can probably work around it in most cases, however we have seen cases where this data gets clobbered because the map got overwritten with a call to `ServerSetReplicatedTargetData` before the previous call was fully processed.
I’ve seen some comments in the ASC about batching, which sounds like it could help mitigate this issue significantly. But according to the comments that feature is considered “work in progress”.
Is batching the recommended approach to handling this problem? Or is there another approach that Epic recommends?
Is there a reason that the replication map is keyed off the `AbilityOriginalPredictionKey` rather than the scoped key?
Thank you for your help!