What is the cost of using Resources.Load?

I’m working on a driving game that requires up to 20 traffic car prefabs in the world at a time. They will spawn and unspawn regularly, so the total number in game will probably fluctuate between 5 and 20. My question is about the most efficient way to do this (I can’t find information on it anywhere). Is there much cost of creating GameObjects during gameplay?

Option 1 - Create my prefab instances on startup, store them at an unused world location, then move them in and out as I need them.

Option 2 - Make the traffic cars a resource and create them during gameplay using Resources.Load() then instantiating GameObjects.

Resources.Load involves accessing the harddrive, which is notoriously slow because it contains moving parts. So you’re better off loading all the resources you need at startup, and then either manipulate their visibility or instantiate prefabs without using Resources.Load to provide the model.

For your particular scenario, however, I’d recommend creating a public Transform variable in your script, and then drag the car prefab onto it in the editor. Calling Instantiate by passing in that prefab Transform causes objects to be spawned without constantly looking at the harddrive to acquire the model to clone.

Just posted this on a similar topic, but gonna repost similar info anyway.

In my case preloading multiple versions of every possible spawn (over 40 available types) was using almost all of the 3GS\Droid’s memory. On the flipside not creating a pool meant tons of stuttering. The solution was to create just one temp copy of each object and use
newObj = (GameObject)Instantiate( pool[index].gameObject );

In my case this solved the problem entirely - Instantiate() seems be much faster than Resources.Load().