Пример #1
0
    public static void CheckInstance()
    {
        if (_instance != null)
        {
            return;
        }

        _instance = hSettings.instance.gameObject.AddComponent <hUpdater>();
    }
Пример #2
0
 private void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
     }
     if (_instance != this)
     {
         Destroy(this);
     }
     DontDestroyOnLoad(this);
 }