using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObstacleInstantiator : MonoBehaviour { public GameObject obstacle; void Start() { if (obstacle != null) Instantiate(obstacle,transform); } }