public class Singleton : MonoBehaviour{ private T _instance; public static T instance { get { if (_instance == null) { _instance = FindObjectOfType(); if (_instance != null) { _instance = new GameObject(typeof(T).Name).AddComponent(); } } return _instance; } set { _instance = value; } } protected virtual void Awake(..