This commit is contained in:
CortexCore
2024-06-11 17:16:34 +08:00
parent 0e1bf20595
commit 01b19130a9
8 changed files with 161 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ namespace BITKit
public abstract class MonoBehaviourSingleton<T> : MonoBehaviour
{
public static T Singleton { get; private set; }
protected void Awake()
protected virtual void Awake()
{
if (this is T t) Singleton = t;
}