public override void Dispose()
 {
     if (null != _context && null != _context.CoroutinePool)
     {
         AsyncRequestHelper.Uninstall(_context.CoroutinePool, this);
     }
     base.Dispose();
 }
        protected override void OnLoadProcess()
        {
            Logger.LogInfo("Start asynchronously loading process: {0}", _path);

            IsLoading = true;

            AsyncRequestHelper.Setup(_context.CoroutinePool, this);
        }
        protected override void OnLoadProcess()
        {
            if (null == _bundleLoader)
            {
                return;
            }
            _root = BuildLoaderTree(ref _total);

            AsyncRequestHelper.Setup(_context.CoroutinePool, this);
        }
Exemple #4
0
        protected override void LoadInternal()
        {
#if UNITY_EDITOR
            Request = new EditorSceneAsync(Context);
#else
            Request = new RuntimeSceneAsync();
#endif
            Request.Load(_path, _mode);

            AsyncRequestHelper.Setup(Context.CoroutinePool, Request);
            AsyncRequestHelper.Setup(Context.CoroutinePool, this);
        }
            public void SyncUinDataInDbTime(IAsyncResult result, QuartzSchedule schedule)
            {
                //同步数据库数据入库时间戳

                //获取传递过来的参数
                AsyncRequestHelper th    = result as AsyncRequestHelper;
                object             param = th.callParam;
                QuartzJobCallBack  call  = new QuartzJobCallBack(DoSyncUinInDBDate);

                object[] callParam = new object[] { call, param };
                //开启 异步循环调度
                schedule.CreateSchedule <QuartzJobCallHelper <DoSyncUinDataInDbTime> >(60, 0, DateTime.Now, callParam);
            }
            public void QueryUinData(IAsyncResult result, QuartzSchedule schedule)
            {
                AsyncRequestHelper th    = result as AsyncRequestHelper;
                object             param = th.callParam;

                "Into Excute Event".WriteLog(new AssemblyExt().GetAppDir(AppStruct.WinApp));
                QuartzJobCallBack call = new QuartzJobCallBack(QuartQuery);

                object[] callParam = new object[] { call, param };
                //开启 异步循环调度

                schedule.CreateSchedule <QuartzJobCallHelper <DoQueryUinData> >(2, 0, DateTime.Now, callParam);

                // QuartQuery(param);
            }
Exemple #7
0
        protected override void LoadAssetInternal()
        {
            Logger.LogInfo("Start asynchronously loading asset from bundle: {0}", _path);

            _request = CreateLoadRequest();
            if (_request == null)
            {
                throw new BundleAssetLoadFailedException(
                          string.Format("Cannot load asset {0} from bundle: {1}", GetAssetName(), _path));
            }

            // Avoid releasing reference when loading assets.
            _loader.Retain();

            AsyncRequestHelper.Setup(_context.CoroutinePool, this);
        }
Exemple #8
0
        protected override void LoadAssetInternal()
        {
            Logs.Logger.LogInfo("Start asynchronously loading asset: {0}", _path);

#if UNITY_EDITOR
            if (_context.Options.UseAssetDatabaseInsteadOfResources)
            {
                _request = new AssetDatabaseAsync(_context);
                _request.LoadAssetAtPath(_path, _type);
            }
#else
            _request = new ResourceAsync();
            _request.LoadAssetAtPath(_path, _type);
#endif

            AsyncRequestHelper.Setup(_context.CoroutinePool, _request);
            AsyncRequestHelper.Setup(_context.CoroutinePool, this);
        }