Thank you @ieva for the great suggestions and @dvanamst that is very exciting to hear. As @ieva mentioned the big overhead with streaming queries is the complexity of the entity prefabs. I was thinking maybe a good way to solve this then is to use LOD, so that even if the game object is still being checked out, for the player whats being rendered could be very simplified or even culled at far distances. However it depends on whats still being loaded for the prefab, if the checkout still has to process the load of all the prefabs components then it doesn’t matter if LOD is helping to simplify the render for at least the player.
One thing that seems like it would be really nice to have built into spatialos is a type of LOD system for streaming entities based on distances, it could checkout different prefabs depending on how close the entity of interest was to the client player or reference. If you were really far away then spatialos could checkout just a very simple prefab with a single transform.
Maybe there actually is a way to get something of this effect by just modifying the streaming definition more in client worker bridge settings, I’m not sure. I saw in the documentation that there was a way to receive only certain component value updates, and even turn off Position and Rotation updates. It would be nice to tell bridge to be able to do the opposite and only receive Position and Rotation updates, but I guess that doesn’t stop the entity from still checking out the expensive game object. Really all you want is 6 floats for position and rotation, so even if that’s a large total moving entity count, say 100,000, that’s only 400kB. If those 100,000 entities positions/rotations are updated at 1 hz for the client view then that’s 400kB/sec which is quite manageable.
One thing that I have found when using streaming queries as well is that any entities close to the distant streaming queries also get checked out too. It looks like this effect is described in the documentation as well and maybe makes sense from the chunk perspective, I just found it a little surprising and it is something to be careful about if you are trying to limit the number of items being loaded.
If you really wanted the entirely to have a separate very low weight prefab following and representing the player would there be a way so the streaming query entity didn’t check out other entities close to it? Otherwise just having the simple prefab entity close to the player entity would checkout out the player prefab anyway and defeat the purpose.