22 lines
393 B
C#
22 lines
393 B
C#
|
using UnityEngine;
|
|||
|
|
|||
|
namespace HK
|
|||
|
{
|
|||
|
public class MonoManager<T> : MonoBehaviour
|
|||
|
{
|
|||
|
private static T _instance;
|
|||
|
|
|||
|
public static T Instance => _instance;
|
|||
|
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
_instance = this.gameObject.GetComponent<T>();
|
|||
|
Initialize();
|
|||
|
}
|
|||
|
|
|||
|
public virtual void Initialize()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
}
|