Handy Tip, Procedural Level Generation to Static!

As an Indie solo game developer one of the potential ways to generate content is to procedurally build levels, only you lose all of the cool Occlusion, Navmesh (3.5+), Texture Baking features in unity.

Or at least that’s what I thought, until I tried a simple cut and paste experiment.

  1. Procedural generate level at runtime
  2. Pause Game
  3. Select All Level Items
  4. Edit → Save Selection → … 1 [ Ctrl + Alt + 1 ]
  5. Stop
  6. Create New Scene
  7. Edit → Load Selection → …1 [ Ctrl + Shift + 1 ]
  8. Save Scene

Now bake in your Occlusion / Navmesh / Lighting.

Posted as this was an ability of Unity I had not realised existed, and a problem I think most Indie developers will have.

You can also save the scene’s position at runtime, check out the saving docs for a script.

I sometimes generate data in BlitzMax (fast prototyping, coding fun) which i afterwards import into Unity.