Exemplo n.º 1
0
 private void OnDestroy()
 {
     if (_instance == this)
     {
         base_service?.Dispose();
         login_client?.Dispose();
         _instance = null;
     }
 }
Exemplo n.º 2
0
 private void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }