예제 #1
0
        internal AssetBase(string path, Type type, BundleLoaderBase target, BundlerContext context)
        {
            _loader  = target;
            _path    = path;
            _type    = type;
            _context = context;

            ThrowIfBundleError();

            LoadAsset();
        }
예제 #2
0
        internal LoadRequest(ModeBase mode, BundlerContext context, string path, BundleLoaderBase bundleLoader)
        {
            _path         = path;
            _context      = context;
            _mode         = mode;
            _bundleLoader = bundleLoader;

            IsDone = _bundleLoader == null;

            if (!IsDone)
            {
                LoadInternal();
            }
        }
예제 #3
0
        internal SceneBase(string path, LoadSceneMode mode, BundlerContext context, BundleLoaderBase bundleLoader = null)
        {
            _path         = path;
            _mode         = mode;
            Context       = context;
            _bundleLoader = bundleLoader;

            _scenePath = _path.Substring(7, _path.Length - 13); // Cut from "Assets/_____.unity"

            if (_bundleLoader != null && !_bundleLoader.IsDone)
            {
                throw new BundleException("Loader hasn't finished!");
            }

            LoadInternal();
            Retain();
        }
예제 #4
0
        private void LoadRecursive(BundleLoaderBase bundleLoader)
        {
            // Load dependencies at first
            foreach (var dependency in bundleLoader.Dependencies)
            {
                LoadRecursive(dependency);
            }

            // Load target at last
            if (!bundleLoader.IsStarted)
            {
                bundleLoader.Load();
            }

            // Force load complete immediately if target is async loader.
            var async = bundleLoader as BundleLoaderAsync;

            if (async != null && !async.IsDone)
            {
                async.ForceLoadComplete();
            }
        }
예제 #5
0
 internal LoadRequestSync(ModeBase mode, BundlerContext context, string path, BundleLoaderBase bundleLoader)
     : base(mode, context, path, bundleLoader)
 {
 }
예제 #6
0
 internal SceneAsync(string path, LoadSceneMode mode, BundlerContext context, BundleLoaderBase loader)
     : base(path, mode, context, loader)
 {
 }
예제 #7
0
 internal BundleAssetAsync(string path, Type type, BundleLoaderBase target, BundlerContext context)
     : base(path, type, target, context)
 {
 }