private void OnDestroy() { if (_instance == this) { base_service?.Dispose(); login_client?.Dispose(); _instance = null; } }
private void Awake() { if (_instance == null) { _instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }