public GameObject GetRoomTemplate(DoorOpenings firstDir, DoorOpenings secondDir) { RoomsTypes neededType = GetRoomType(firstDir, secondDir); GetRoomTemplate(neededType); Debug.LogError("Get Room Prefab error for firstDir " + firstDir + " secondDir " + secondDir); return(null); }
private GameObject GetRoomTemplate(RoomsTypes roomType) { for (int i = 0; i < roomsTemplates.Length; i++) { if (roomsTemplates[i].roomType == roomType) { return(roomsTemplates[i].roomPrefab); } } Debug.LogError("Get Room Prefab error for type " + roomType); return(null); }