"Hello, I’m using UE5 and Fast array serializer with this parameters:
1. USTRUCT()
2. struct FSocketConfigFASItem : public FFastArraySerializerItem
3. {
4. GENERATED_USTRUCT_BODY()
5.
6. FSocketConfigFASItem();
7.
8. UPROPERTY()
9. FVector_NetQuantize SocketPosition = FVector_NetQuantize(ForceInitToZero);
10.
11. UPROPERTY()
12. uint32 ItemsSelectionStartingSeed = 0;
13.
14. UPROPERTY()
15. uint32 TransformsStartingSeed = 0;
16.
17. UPROPERTY()
18. FGameplayTag ForcedSelectTag = FGameplayTag::EmptyTag;
19.
20.
21. void PostReplicatedAdd(const struct FSocketConfigFAS& InArraySerializer);
22. };
23.
24. USTRUCT()
25. struct FSocketConfigFAS : public FFastArraySerializer
26. {
27. GENERATED_USTRUCT_BODY()
28.
29. UPROPERTY()
30. TArray<FSocketConfigFASItem> Items;
31.
32.
33. bool NetDeltaSerialize(FNetDeltaSerializeInfo& DeltaParms)
34. {
35. // Set it to TRUE if you want to debug bytes sent and received
36. bool bDebugData = true;
37.
38. if (bDebugData && DeltaParms.Reader)
39. {
40. if (DeltaParms.Reader->GetBytesLeft() > 0)
41. {
42. FString Message = "NetDeltaSerialize Client READING data for " + DeltaParms.DebugName + " Bytes Left: " + FString::FromInt(DeltaParms.Reader->GetBytesLeft()) + " - Items Num: " + FString::FromInt(Items.Num());
43. UE_LOG(LogSocketSystem, Warning, TEXT("%s"), *Message);
44. }
45. else
46. {
47. FString Message = "NetDeltaSerialize Client FINISHED READING data for " + DeltaParms.DebugName + " Bytes Left: " + FString::FromInt(DeltaParms.Reader->GetBytesLeft()) + " - Items Num: " + FString::FromInt(Items.Num());
48. UE_LOG(LogSocketSystem, Warning, TEXT("%s"), *Message);
49. }
50. }
51.
52. bool bRes = FFastArraySerializer::FastArrayDeltaSerialize<FSocketConfigFASItem, FSocketConfigFAS>(Items, DeltaParms, *this);
53.
54. if (bDebugData && DeltaParms.Writer && DeltaParms.Writer->GetNumBytes() > 1)
55. {
56. FString Message = "NetDeltaSerialize Server WRITING data for " + DeltaParms.DebugName + " Bytes to write: " + FString::FromInt(DeltaParms.Writer->GetNumBytes()) + " - Items Num: " + FString::FromInt(Items.Num());
57. UE_LOG(LogSocketSystem, Warning, TEXT("%s"), *Message);
58. }
59.
60. return bRes;
61. }
62.
63. };
64. //-------------------------------------------------------------------------------
65.
66. /**
67. * Template function needed to declare a custom delta serialization method
68. */
69. template<>
70. struct TStructOpsTypeTraits< FSocketConfigFAS > : public TStructOpsTypeTraitsBase2< FSocketConfigFAS >
71. {
72. enum
73. {
74. WithNetDeltaSerializer = true,
75. };
76. };
Everything works correctly inside editor, but when I try a packaged build all FSocketConfigFAS are not able to replicate anymore because I got this message:
LogRep: Error: ReceiveFastArrayItem: Invalid property terminator handle - Handle=51050 (this number varies)
I tried also to simplify my array item but the result are always the same.
Thanks to debug messages I put I can confirm that the server is able to write the correct number of bytes:
NetDeltaSerialize Server WRITING data for MainReplicatedConfigs Bytes to write: 660 - Items Num: 33
and the client is able to receive the same amount of bytes:
NetDeltaSerialize Client READING data for MainReplicatedConfigs Bytes Left: 660 - Items Num: 0
but just after this debug line I got the above mentioned error.
Any suggestions?
Thanks"