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;
 }
示例#4
0
 public void StopAndPrintMT(string service = "")
 {
     MTDispatch.Instance().Enqueue(() => StopAndPrint(service));
 }