- Home /
Saving & Optimizing a scene with ten thousand prefabs in a Server Client environment
So I am experimenting with Unity to achieve a scientific goal. I can't get too specific but will try to be a specific as possible.
I will and do have roughly 10,000 prefabs (nodes) all rendering with excellent performance, as they are quite static in a proof of concept.
I am building a system that I need any user that logs into the system to see real time information if they click on the node. Which I can gather on demand.
My question is & debate in my head; I could have some sort of cache and send all the info of each prefab each time a client needs load the scene (which is a lot of data to be sent) or I could make the client download the set of nodes and have a local cache that i could mark as old, dirty etc. which would get tiresome for the user (each time they launch the .exe they wait for the node list). & after time the node list would grow stagnant.
What approach or option would you suggest?
Thank you!
Will the user be able to see and interact with ALL 10k nodes realistically? They are probably going to be looking at a few of them at a time. You can spawn 10k dummy nodes with no data or fake data and then only get the real data once the user gets close to interact with some nodes. You would only need to get the data for the few nodes that the user can see.
I think this would solve the problem thank you! With one $$anonymous$$or detail I missed I think that the nodes would appear to "move" location as I load them as the user gets close. Nodes cannot move dynamically although nodes can disappear and reappear in a different location depending on the client(s) interactions with them.
I think also I can have some sort of seed to place the nodes within the scene? Which could compliment your suggestion, as it is important that no node(s) conflict with the same location. The nodes could be deter$$anonymous$$istic within the scene. Does that make sense?
Well if you just made a request to the server for the position of each node, and no other data, even with 10k nodes, that is a very small amount of data. And then have a separate request to load in the details for specific nodes, once you are close. That would solve your jumping node and initial placement issue.