void CreatePrefab(CaveGenerator caveGenerator) { Cave cave = caveGenerator.ExtractCave(); Assert.IsNotNull(cave, "Internal error: extracted null cave."); string path = CreateFolder(ROOT_FOLDER, CAVE_FOLDER); CreateMeshAssets(cave.GetFloors(), FLOOR_FOLDER, path); CreateMeshAssets(cave.GetCeilings(), CEILING_FOLDER, path); CreateMeshAssets(cave.GetWalls(), WALL_FOLDER, path); CreateCavePrefab(cave.GameObject, path); Destroy(cave.GameObject); }