using System.Collections; using System.Collections.Generic; using UnityEngine; public class Manager : MonoBehaviour where TManager : Component { private static TManager instance; public static TManager Instance { get { return instance; } } protected virtual void Awake() { instance = this as TManager; } }