Пример #1
0
        protected override void OnLoadProcess()
        {
            Logger.LogInfo("Start asynchronously loading process: {0}", _path);

            IsLoading = true;

            AsyncRequestHelper.Setup(_context.CoroutinePool, this);
        }
Пример #2
0
        protected override void OnLoadProcess()
        {
            if (null == _bundleLoader)
            {
                return;
            }
            _root = BuildLoaderTree(ref _total);

            AsyncRequestHelper.Setup(_context.CoroutinePool, this);
        }
Пример #3
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);
        }
Пример #4
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);
        }
Пример #5
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);
        }