/**<summary> Spawn a single object in a random position on collider </summary>*/ public GameObject Spawn(GameObject spawnObject, Parser.Bounds bounds, Vector3 center, float?minRadius, float maxRadius, float maxHeight, Transform parent) { return(Spawn(spawnObject, bounds.GetUnityBounds(), center, minRadius.HasValue ? minRadius.Value : 0, maxRadius, maxHeight, parent)); }
/**<summary> Get maximum amount / count resulting from density and area constraints </summary>*/ private int MaxAmount(float density, float distance, Parser.Bounds bounds) { return((int)(density * Mathf.Min(bounds.area, distance * distance * 4))); }
/**<summary> Spawn objects in random positions on collider </summary>*/ public GameObject[] Spawn(GameObject spawnObject, Parser.Bounds bounds, float minRadius, int count, float maxHeight, Transform parent) { return(Spawn(spawnObject, bounds, Vector3.zero, minRadius, 1000, count, maxHeight, parent)); }