mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-23 00:28:23 -05:00
18 lines
434 B
C#
18 lines
434 B
C#
using UnityEngine;
|
|
|
|
namespace UnityAtoms.MonoHooks
|
|
{
|
|
/// <summary>
|
|
/// Mono Hook for [`OnDestroy`](https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnDestroy.html)
|
|
/// </summary>
|
|
[EditorIcon("atom-icon-delicate")]
|
|
[AddComponentMenu("Unity Atoms/Hooks/On Destroy Hook")]
|
|
public sealed class OnDestroyHook : VoidHook
|
|
{
|
|
private void OnDestroy()
|
|
{
|
|
OnHook();
|
|
}
|
|
}
|
|
}
|