using System.Collections; using System.Collections.Generic; using UnityEngine; public class DebugSpawner : MonoBehaviour { public Transform SpawnPoint; public GameObject Prefab; public TMPro.TextMeshProUGUI _count; private int count = 0; public void Spawn() { count++; _count.SetText(count.ToString()); Instantiate(Prefab, SpawnPoint); } private void Update() { if (Input.GetKeyDown(KeyCode.UpArrow)) Spawn(); } }