26 lines
494 B
C#
Raw Normal View History

2025-03-11 16:24:25 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ZXKFramework
{
public abstract class MonoSingleton<T> : MonoBehaviour where T : MonoBehaviour
{
private static T m_instance;
public static T Instance
{
get
{
return m_instance;
}
}
protected virtual void Awake()
{
m_instance = this as T;
}
}
}