public Vector3 GetSpawnPosition() { Vector3 _position = Vector3.zero; if (ValidSpawnPoints.Count > 0) { SpawnPointObject _point = ValidSpawnPoints[Random.Range(0, ValidSpawnPoints.Count)]; if (_point != null) { _position = _point.GetSpawnPosition(BaseOffset); } } else if (ReferenceGameObject != null) { _position = PositionTools.GetRandomPosition(ReferenceGameObject.transform.position, 25); _position.y += BaseOffset; } return(_position); }