Alternative to NativeArray of Entities in networked component?

Currently, I’m working on vehicles that can be entered by multiple players. I have Driver, Gunners and Passengers components, of which the latter two currently have a NativeArray of entities which refer to the player in a given seat. Since (afaik) NativeArrays can’t get the GhostField attribute, I’m not sure what the best alternative is. Currently, I’m considering transforming the three components into BufferElements, which will then hold the references to the player entities, as well as creating an additional (static) component that contains the number of seats per type to make sure I don’t overfill a vehicle. But that would require that the order of BufferElements doesn’t change: otherwise, it would look like players are constantly switching seats.

Would that be a workable solutions? Are there better alternatives? Or did I miss something in syncing NativeArrays? Or should I create a Ghost Template?

Hey TijsP, to validate did you encounter this or just asking? IBufferElementData should keep its order and should work in your case, let us know if it doesn’t.
We have some work in progress for FixedList support, but not sure in which release it’ll land yet.

I haven’t encountered this, just wanted to make sure it was the case! I should have worded it better. Thanks for letting me know, in that case I’ll use the buffer elements for now