Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LifecycleNotifier.cs 485B

1234567891011121314151617181920
  1. using System;
  2. using UnityEngine;
  3. namespace UnityEngine.Purchasing
  4. {
  5. /// <summary>
  6. /// Lifecycle notifier waits to be destroyed before calling a callback.
  7. /// Use to notify script of hierarchy destruction for avoiding dynamic
  8. /// UI hierarchy collisions.
  9. /// </summary>
  10. internal class LifecycleNotifier : MonoBehaviour
  11. {
  12. public Action OnDestroyCallback;
  13. void OnDestroy()
  14. {
  15. OnDestroyCallback?.Invoke();
  16. }
  17. }
  18. }