Exemplo n.º 1
0
        public static void Run(AddressableDispatcherConfig config)
        {
            var dispatcher = new AddressableDispatcher(config);

            dispatcher.RunCheckers();
            AssetDatabase.Refresh();
        }
Exemplo n.º 2
0
        public static void Run(AddressableDispatcherConfig config, string is_atlas_model, Dictionary <string, List <string> > groupDi)
        {
            var dispatcher = new AddressableDispatcher(config);

            dispatcher.RunCheckers(is_atlas_model, groupDi);
            //AssetDatabase.Refresh();
        }
        void Initialize()
        {
            configChanged   = false;
            filterType      = AddressableDispatcherFilterType.Root;
            targetAssetPath = AssetDatabase.GetAssetPath(target);
            if (!AssetBundleUtility.IsPackagePath(targetAssetPath))
            {
                return;
            }

            packagePath       = AssetBundleUtility.AssetsPathToPackagePath(targetAssetPath);
            databaseAssetPath = AddressableInspectorUtils.AssetPathToDatabasePath(targetAssetPath);
            dispatcherConfig  = AssetDatabase.LoadAssetAtPath <AddressableDispatcherConfig>(databaseAssetPath);
            if (dispatcherConfig != null)
            {
                dispatcherConfig.Load();
                filterType = dispatcherConfig.Type;
            }
        }
 void OnDisable()
 {
     if (configChanged)
     {
         bool checkApply = EditorUtility.DisplayDialog("Modify Warning",
                                                       "You have modified the Addressable dispatcher setting, Apply it ?",
                                                       "Confirm", "Cancel");
         if (checkApply)
         {
             Apply();
         }
         else if (isNewCreate)
         {
             Remove();
         }
     }
     dispatcherConfig = null;
     inspectorSate.Clear();
     isNewCreate = false;
 }
Exemplo n.º 5
0
 public AddressableDispatcher(AddressableDispatcherConfig config)
 {
     this.config = config;
     assetsPath  = AssetBundleUtility.PackagePathToAssetsPath(config.PackagePath);
 }