moonwave99
4
Q:

spawner unity 2d

using UnityEngine;

public class Spawner : MonoBehaviour
{
	public GameObject Object;
	float timebtwspawn;
	public float startTimeBtwSpawn;
    void Update()
    {
			if (timebtwspawn <= 0)
			{
				Instantiate(Object, transform.position, Quaternion.identity);
			}
			else
			{
				timebtwspawn -= Time.deltaTime;
			}
		}
	}

0

New to Communities?

Join the community