HKI Core
ExitTrigger.cs
Go to the documentation of this file.
1 using UnityEngine;
2 using UnityEngine.Events;
3 
4 namespace HKI.Core.Triggers
5 {
9  [AddComponentMenu("HKI/Triggers/ExitTrigger")]
10  public class ExitTrigger : MonoBehaviour
11  {
12  // Public Variables
13  [Header("Callbacks on exit:")]
14  [SerializeField] UnityEvent OnExit = new UnityEvent();
15 
16  // Trigger function
17  void OnTriggerExit(Collider collider)
18  {
19  OnExit.Invoke();
20  }
21  }
22 }
void OnTriggerExit(Collider collider)
Definition: ExitTrigger.cs:17
This trigger will invoke added functions on exit.
Definition: ExitTrigger.cs:10