public static void CheckInstance() { if (_instance != null) { return; } _instance = hSettings.instance.gameObject.AddComponent <hUpdater>(); }
private void Awake() { if (_instance == null) { _instance = this; } if (_instance != this) { Destroy(this); } DontDestroyOnLoad(this); }