Where do I add code to do procedural generation of environments?

Say for example I want to generate an asteroid field with varying sizes of a single asteroid model. Where would i add this so that it only runs one time at run time?
I know how to add components to things in the scene but not to the scene itself.
Thoughts?

What people usually do, is they create a ‘Manager’ empty game object, that has scripts like this one. As for running it once, you can use Start or Awake.

–David–