void Awake()
 {
     if (_instance == null)
     {
         _instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
 }
        void Init()
        {
            if (_instance == null)
            {
                _instance = this;

                if (Application.isPlaying)
                {
                    DontDestroyOnLoad(this.gameObject);
                }
            }
        }
 void OnDestroy()
 {
     _instance = null;
 }
Example #4
0
 public void StopAndPrintMT(string service = "")
 {
     MTDispatch.Instance().Enqueue(() => StopAndPrint(service));
 }