How will be replicated TArray with 100 000 elements? Fully or partially?
Can I affect to this?
I don’t need full transfer via connection of full 100000 elems for every change of array.
I just want to catch replication for new and changed elements (not for all).
RPC is not cute solution…
It would be nice to add new features like OnSliceRep_MyArray…
It seems engine send a whole array when it was changed. You can check UE_4.17\Engine\Source\Runtime\Engine\Private\RepLayout.cpp file to know how exactly engine replicates properties. There is two error checks I found:
// Validate the maximum number of elements.
if (ArrayNum > MaxRepArraySize)
{
UE_LOG(LogRepTraffic, Error, TEXT("SerializeProperties_DynamicArray_r: ArraySize (%d) > net.MaxRepArraySize(%d) (%s). net.MaxRepArraySize can be updated in Project Settings under Network Settings."),
ArrayNum, MaxRepArraySize, *Cmd.Property->GetName());
Ar.SetError();
}
// Validate the maximum memory.
else if (ArrayNum * (int32)Cmd.ElementSize > MaxRepArrayMemory)
{
UE_LOG(LogRepTraffic, Error,
TEXT("SerializeProperties_DynamicArray_r: ArraySize (%d) * Cmd.ElementSize (%d) > net.MaxRepArrayMemory(%d) (%s). net.MaxRepArrayMemory can be updated in Project Settings under Network Settings."),
ArrayNum, (int32)Cmd.ElementSize, MaxRepArrayMemory, *Cmd.Property->GetName());
Ar.SetError();
}
so it seems we limited to net.MaxRepArraySize and net.MaxRepArrayMemory sizes while replicating an array.
Nothing against a Feature like that. But in general you don´t replicate large arrays. Instead you send the Change you want and broadcast it to all Clients. Each Client Updates it locally.