First try
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user