I have a CSV with the following columns: time
, carId
, x
, y
. I am writing a script which will read the CSV and spawn car objects and simply update their positions over time based on the data.
Over the span of about 20 minutes, around 3500 car objects will have to have been instantiated. While they won't all be in the simulation at one point in time (once a car gets to certain points in my road network, it will disappear), but I want to be prepared for a situation where hundreds of car objects move through the network at once.
I'm still new to Unity and its rendering pipeline when it comes to optimizing for this big of a project. I know in some cases it's better to setActive(false)
on GameObjects as opposed to destroy()
and maybe this is one of them. What else should I consider when handling this many gameobjects in Unity?