using System.Collections.Generic; using System; using UnityEngine; public class StopRecordingTrigger : MonoBehaviour { public string tagFilter = "Player"; public static event Action OnRecordStop; // Start is called once before the first execution of Update after the MonoBehaviour is created private void OnTriggerEnter(Collider other) { if (!string.IsNullOrEmpty(tagFilter) && !other.gameObject.CompareTag(tagFilter)) return; OnRecordStop.Invoke(); } }