I have a code that creates a spawnpoint at random position for a prefab, which in turn creates a lot of prefabs around this spawnpoint.
After this, a new spawnpoint is created at random position which in turn creates a lot of prefabs around this spawnpoint. And so it goes …
The problem is that I do not know how I can save the locations of all the prefabs so that it is not removed when I finish runtime. I want to be able to create it in the editor “with a button” or keep them after they are created in runtime so they become permanent, so to speak.
It would be very difficult and messy to place them manually on the terrain so to do it via code is perfect.