soundvision/UnityProject/Assets/Scenes/Examples/LevelThreshold/script/Spawner.cs

16 lines
336 B
C#
Raw Normal View History

2019-10-07 22:03:16 +00:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spawner : MonoBehaviour
{
[SerializeField] private GameObject column;
public void OnThresholdExceeded()
{
var columnObject = Instantiate(column);
columnObject.transform.parent = this.transform;
}
}