25 lines
538 B
C#
25 lines
538 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.Events;
|
||
|
namespace BITKit
|
||
|
{
|
||
|
public class ExcuteOnBehaviour : MonoBehaviour
|
||
|
{
|
||
|
public UnityEvent onAwake = new();
|
||
|
public UnityEvent onStart = new();
|
||
|
public UnityEvent onDestroy = new();
|
||
|
void Awake()
|
||
|
{
|
||
|
onAwake.Invoke();
|
||
|
}
|
||
|
void Start()
|
||
|
{
|
||
|
onStart.Invoke();
|
||
|
}
|
||
|
void OnDestroy()
|
||
|
{
|
||
|
onDestroy.Invoke();
|
||
|
}
|
||
|
}
|
||
|
}
|