UnityScripterAI
Discord ↗
Link Copied to Clipboard
×
"self destruction of gameobject after a time"
public class SelfDestruction : MonoBehaviour { public float timer = 2.5f; void Update() { timer -= Time.deltaTime; if (timer <= 0) { Destroy(gameObject); } } }