Пример #1
0
 protected AssetLoading(AssetLoadingPattern loadingPattern, string bundleName, string assetName, Type objectType)
 {
     LoadingPattern = loadingPattern;
     BundleName     = bundleName;
     Name           = assetName;
     AssetGroup     = AssetGroup.Asset;
     ObjectType     = objectType;
 }
Пример #2
0
        public void AssetNotFound(AssetLoadingPattern loadingPattern, string bundleName, string assetName)
        {
            _logger.ErrorFormat("Load Asset {0}:{1} Pattern {2} Failed", bundleName, assetName, loadingPattern);

            int  count     = _loadStats.Count;
            bool processed = false;

            for (int i = 0; i < count; ++i)
            {
                if (_loadStats[i].AssetNotFound(bundleName, assetName))
                {
                    processed = true;
                    break;
                }
            }

            if (!processed)
            {
                _logger.WarnFormat("Can not found processor for Not Found Asset {0}:{1}", bundleName, assetName);
            }
        }
Пример #3
0
        public void LoadAsset(string bundleName, string assetName, Type ObjectType)
        {
            string bundleNameWithVariant;
            AssetLoadingPattern LoadingPattern = AssetLoadingPattern.Unkown;

            if (LoadAssetBundle(bundleName, out bundleNameWithVariant) != AssetBundleStatus.Failed)
            {
                var warehouse    = FindWarehouse(bundleName, _defaultWarehouse);
                var assetLoading = warehouse.LoadAsset(bundleNameWithVariant, assetName, ObjectType);
                if (warehouse is SimulationWarehouse)
                {
                    LoadingPattern = AssetLoadingPattern.Simulation;
                }
                if (assetLoading != null)
                {
                    _assetsWaitForBundle.AddLastExt(assetLoading);
                    return;
                }
            }

            _assetsWaitForBundle.AddLastExt(AssetBundleWarehouse.LoadFailed(LoadingPattern, false, bundleName, assetName, ObjectType));
        }
Пример #4
0
 public FailLoading(AssetLoadingPattern LoadingPattern, bool isSceneLoading, string bundleName, string assetName, Type objectType) :
     base(LoadingPattern, bundleName, assetName, objectType)
 {
     AssetGroup = isSceneLoading ? AssetGroup.Scene : AssetGroup.Asset;
 }
Пример #5
0
 public void AssetLoaded(AssetLoadingPattern loadingPattern, string bundleName, string assetName)
 {
     _logger.DebugFormat("Load Asset {0}:{1} Pattern {2} Successfully", bundleName, assetName, loadingPattern);
 }
Пример #6
0
 public static FailLoading LoadFailed(AssetLoadingPattern LoadingPattern, bool isSceneLoading, string bundleName, string name, Type objectType)
 {
     return(new FailLoading(LoadingPattern, isSceneLoading, bundleName, name, objectType));
 }
Пример #7
0
 public void AssetNotFound(AssetLoadingPattern loadingPattern, string bundleName, string assetName)
 {
 }