コード例 #1
0
 public void DestroyTimeOutHelper()
 {
     if (mTimeOutHelper != null)
     {
         GameObject.DestroyObject(mTimeOutHelper.gameObject);
         mTimeOutHelper = null;
     }
 }
コード例 #2
0
 /// <summary>
 /// 创建线程超时辅助类
 /// </summary>
 /// <param name="timeOut">超时时间 </param>
 /// <param name="timeOutEventHandler"></param>
 public void SetTimeOutHelper(float timeOut,DownloadTimeOutEventHandler timeOutEventHandler)
 {
     if (timeOut <= 0.0001 && (timeOutEventHandler == null))
     {
         return;
     }
     mTimeOutHelper = new GameObject("TimeOutHelper").AddComponent<TimeOutHelper>();
     mTimeOutHelper.Init(timeOut, timeOutEventHandler);
 }