FFastArraySerializer array map size errors in editor when changing array.
I am working on a replicated inventory component using FFastArraySerializerItem and FFastArraySerializer.
I am getting a strange error in the editor with my FFastArraySerializer array.
In the editor I have this message, "LogNetFastTArray: Warning: OldMap size (1) does not match item count (2)".
The engine source has this line in FFastArraySeralizer:
UE_LOG(LogNetFastTArray, Warning, TEXT("OldMap size (%d) does not match item count (%d) for struct (%s), missing a MarkArrayDirty on element add/remove?"), OldIDToKeyMap.Num(), ArraySerializer.CachedNumItemsToConsiderForWriting, *Struct->GetOwnerStruct()->GetName());
I have marked each item as dirty and also tried using MarkArrayDirty() after changes. Not sure what could be the cause or if I am overlooking something.
FFastArraySerializerItem and FFastArraySerializer code:
[pastebine code](https://pastebin.com/W42E7pvY)
And the relevant inventory component code:
[pastebin code](https://pastebin.com/wqH6686L)
So far I just have this on a Blueprint character that I have attached the component to and added a few empty items to the array in editor. I started messing with widgets and changing the amount of slots in editor and this error appeared in testing in PIE.