public MosqueDataStruct getDataStruct(BuildingFoundation foundation) { MosqueDataStruct dataStruct = new MosqueDataStruct(); dataStruct.size = foundation.lengthX; dataStruct.collarDiameter = dataStruct.size * 0.9f; dataStruct.collarHeight = 1.5f; int collars = Randomiser.intBetween(0, 3); dataStruct.collarSequence = new List <int> (); for (int i = 0; i < collars; i++) { dataStruct.collarSequence.Add((int)Randomiser.oneOf(0, 1.5f)); //0 -> full collar, 1 -> arch collar } dataStruct.baseHeight = 5; dataStruct.decorSequence = generateDecorSequence(); dataStruct.mosqueBodyPrefab = mosqueBodyPrefabs[Random.Range(0, mosqueBodyPrefabs.Count)]; dataStruct.fullCollarPrefab = fullCollarPrefab; GameObject[] arches = GenericUtils.loadAllPrefabs("prefabs/arches/simple"); dataStruct.archPrefab = arches [Random.Range(0, arches.Length)]; dataStruct.topPrefab = topPrefabs [Random.Range(0, topPrefabs.Count)]; dataStruct.decorPrefab = decorPrefab; return(dataStruct); }