SquareDash/Library/PackageCache/com.unity.purchasing@4.10.0/Runtime/Stores/FakeStore/LifecycleNotifier.cs
kingjuulian06 0efb85038a Arbeit 2
2023-11-21 22:03:49 +01:00

21 lines
485 B
C#

using System;
using UnityEngine;
namespace UnityEngine.Purchasing
{
/// <summary>
/// Lifecycle notifier waits to be destroyed before calling a callback.
/// Use to notify script of hierarchy destruction for avoiding dynamic
/// UI hierarchy collisions.
/// </summary>
internal class LifecycleNotifier : MonoBehaviour
{
public Action OnDestroyCallback;
void OnDestroy()
{
OnDestroyCallback?.Invoke();
}
}
}