Transform PickPrefab(HexFeatureCollection[] collection, int level, float hash, float choice) { if (level > 0) { float[] thresholds = HexMetrics.GetFeaturesThresholds(level - 1); for (int i = 0; i < thresholds.Length; i++) { if (hash < thresholds[i]) { return(collection[i].Pick(choice)); } } } return(null); }