public static void Run(AssetBundleDispatcherConfig config)
        {
            var dispatcher = new AssetBundleDispatcher(config);

            dispatcher.RunCheckers();
            AssetDatabase.Refresh();
        }
 public AssetBundleDispatcher(AssetBundleDispatcherConfig config)
 {
     this.config = config;
     assetsPath  = AssetBundleUtility.PackagePathToAssetsPath(config.PackagePath);
     importer    = AssetBundleImporter.GetAtPath(assetsPath);
     if (importer == null)
     {
         Debug.LogError("Asset path err : " + assetsPath);
     }
 }
示例#3
0
 public AssetBundleDispatcher(AssetBundleDispatcherConfig config)
 {
     this.config = config;
     assetsPath  = AssetBundleUtility.PackagePathToAssetsPath(config.PackagePath);
     importer    = AssetBundleImporter.GetAtPath(assetsPath);
     if (importer == null)
     {
         Logger.LogError($"定义的Package信息path:({assetsPath}) 没有找不到,请对比Asset/Editor/AssetBundle/xxx和Asset/AssetsPackage/xxx");
     }
 }
 void OnDisable()
 {
     if (configChanged)
     {
         bool checkApply = EditorUtility.DisplayDialog("Modify Warning",
                                                       "You have modified the AssetBundle dispatcher setting, Apply it ?",
                                                       "Confirm", "Cancel");
         if (checkApply)
         {
             Apply();
         }
     }
     dispatcherConfig = null;
     inspectorSate.Clear();
 }
示例#5
0
        void Initialize()
        {
            configChanged   = false;
            filterType      = AssetBundleDispatcherFilterType.Root;
            targetAssetPath = AssetDatabase.GetAssetPath(target);
            if (!AssetBundleUtility.IsPackagePath(targetAssetPath))
            {
                return;
            }

            packagePath       = AssetBundleUtility.AssetsPathToPackagePath(targetAssetPath);
            databaseAssetPath = AssetBundleInspectorUtils.AssetPathToDatabasePath(targetAssetPath);
            dispatcherConfig  = AssetDatabase.LoadAssetAtPath <AssetBundleDispatcherConfig>(databaseAssetPath);
            if (dispatcherConfig != null)
            {
                dispatcherConfig.Load();
                filterType = dispatcherConfig.Type;
            }
        }