Hello, sorry for the slow response.
In regard your suggestions, I’ve changed all the relevant data and now instead of trying to replicate an array of components, I am sending a array of strings(like a GUID) to the clients, and then, all clients search locally for the corresponding component.
However, this still has some issues.
1- My project is actually a building with all the systems(structural,plumbing,electrical), with many actors. For instance, if I want to hide all plumbing actors, the array would be 30k+ actors.
Even using only strings, I can’t replicate because the array is too long and it is giving this error:
Error: Attempted to send bunch exceeding max allowed size. BunchSize=301079, MaximumSize=65536
So, that’s one problem, but I think I can get pass through this sending smaller parts of the array at a time.
My second problem is that, if I want to lookup all components using the strings of the array, it is very slow to find all.
A simple example is this:
In my GetSMComponentByID function i have this setup:
Trying to tackle this problem, i thought of creating this variable in every PlayerState, that, when BeginPlay, it maps all IDs to it’s relevant local reference of the component. But this is also, very consuming, so I’ve created a SaveGameObject to store this variable and be able to retrieve in later game sessions.
Man, multiplayer is such a PITA. Is there really no way to store a server reference of the components and the clients retrieve and get it´s “local” reference?
Feels like running in circles.