Advertisement
Pro_Unit

MonoBehaviourSingleCallEvents

Dec 6th, 2018
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3.  
  4. using UnityEngine;
  5. using UnityEngine.Events;
  6. namespace GameCore
  7. {
  8.     public class MonoBehaviourSingleCallEvents : MonoBehaviour
  9.     {
  10.         [SerializeField] UnityEvent _OnEnable;
  11.         private void OnEnable () { _OnEnable.Invoke (); }
  12.  
  13.         [SerializeField] UnityEvent OnAwake;
  14.         private void Awake () { OnAwake.Invoke (); }
  15.  
  16.         [SerializeField] UnityEvent OnStart;
  17.         private void Start () { OnStart.Invoke (); }
  18.  
  19.         [SerializeField] UnityEvent _OnDisable;
  20.         private void OnDiasble () { _OnDisable.Invoke (); }
  21.  
  22.         [SerializeField] UnityEvent _OnDestroy;
  23.         private void OnDestroy () { _OnDestroy.Invoke (); }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement