1
This commit is contained in:
25
Unity/Scripts/Components/ExcuteOnBehaviour.cs
Normal file
25
Unity/Scripts/Components/ExcuteOnBehaviour.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user