wangguan
2020-11-25 2f783596b479d243b1f21ba618e63f44c03c28d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
namespace Core.Utilities
{
    /// <summary>
    /// Singleton that persists across multiple scenes
    /// </summary>
    public class PersistentSingleton<T> : Singleton<T> where T : Singleton<T>
    {
        protected override void Awake()
        {
            base.Awake();
            DontDestroyOnLoad(gameObject);
        }
    }
}