public static void CreateWallMeshes( WallData wall, WallData nextInnerWall, WallData nextOuterWall, WallData prevInnerWall, WallData prevOuterWall, Transform parent = null) { var meshes = WallMeshesGenerator.GetWallMeshes( prevInnerWall, prevOuterWall, wall, nextInnerWall, nextOuterWall); var wallTransform = new GameObject(wall.ToString()).transform; foreach (var mesh in meshes) { MeshGenerator .CreateGameObject(mesh.name, mesh) .transform .SetParent(wallTransform, false); } wallTransform.SetParent(parent); }