using UnityEngine; public class CartTracker : MonoBehaviour { public CartSpawner spawner; void OnDestroy() { if (spawner != null) { spawner.CartRemoved(); } } }