liuzhiwei
2020-12-21 1fbd60b81ef4a93df75c32e7d9aa285d8fa533d1
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);
        }
    }
}