/// <summary> /// OnDrawGizmos, we draw the shape of the area within which objects will spawn /// </summary> protected virtual void OnDrawGizmos() { if (DrawGizmos) { MMSpawnAround.DrawGizmos(SpawnProperties, this.transform.position, GizmosQuantity, GizmosSize, Color.gray); } }
/// <summary> /// Spawns a single object and positions it correctly /// </summary> public virtual void Spawn() { _gameObject = Instantiate(ObjectToInstantiate); SceneManager.MoveGameObjectToScene(_gameObject, this.gameObject.scene); MMSpawnAround.ApplySpawnAroundProperties(_gameObject, SpawnProperties, this.transform.position); }
/// <summary> /// Spawns a single object and positions it correctly /// </summary> public virtual void Spawn() { _gameObject = Instantiate(ObjectToInstantiate); MMSpawnAround.ApplySpawnAroundProperties(_gameObject, SpawnProperties, this.transform.position); }