Integrating BSP trees for environment regeneration in Unity-3D using C#
Attach this code to an empty game object, and assign prefabs for ground and wall regeneration. If you wish to have a variety of prefabs, convert this code block into a list!
public GameObject groundPrefab;
public GameObject wallPrefab;
Ensure that your prefabs and the axis in the code match.