Hi
In this Unity tutorial, I will show you how to Instantiate Prefab in Unity 3D
Here is the script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spawner : MonoBehaviour
{
public float repeatRate;
public GameObject ballPrefab;
void Start(){
StartCoroutine(Spawner());
}
public IEnumerator Spawner(){
bool flag = true;
while(flag){
Instantiate(ballPrefab, transform.position, transform.rotation);
yield return new WaitForSeconds(repeatRate);
}
}
}
▼ SUBSCRIBE OUR CHANNEL▼
https://www.youtube.com/channel/UCWyK...
Please
Like
Share
Subscribe
Thank You So Much.