21 lines
445 B
C#
21 lines
445 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using System.Linq;
|
|
|
|
using UnityEngine.UIElements;
|
|
#if UNITY_EDITOR
|
|
using UnityEditor;
|
|
#endif
|
|
namespace BITKit
|
|
{
|
|
public abstract class MonoBehaviourSingleton<T> : MonoBehaviour
|
|
{
|
|
public static T Singleton { get; private set; }
|
|
protected virtual void Awake()
|
|
{
|
|
if (this is T t) Singleton = t;
|
|
}
|
|
}
|
|
} |