Beispiel #1
0
        public static void UpdateABConfig()
        {
            AssetBundlesConfig abConfig = AddABConfig();

            abConfig.initialPath.Clear();
            abConfig.hotUpdatePath.Clear();
            abConfig.allAssetConfig.Clear();
            abConfig.initialPath.AddRange(AssetBundlesConfig.GetInitialPath());
            abConfig.hotUpdatePath.AddRange(AssetBundlesConfig.GetHotUpdatePath());
        }
Beispiel #2
0
        public static AssetBundlesConfig AddABConfig()
        {
            AssetBundlesConfig abConfig = AssetDatabase.LoadAssetAtPath <AssetBundlesConfig>("Editor Default resources/AM/AssetBundlesConfig.asset");

            if (abConfig == null)
            {
                abConfig = ScriptableObject.CreateInstance <AssetBundlesConfig>();
                abConfig.initialPath.AddRange(AssetBundlesConfig.GetInitialPath());
                abConfig.hotUpdatePath.AddRange(AssetBundlesConfig.GetHotUpdatePath());
                AssetDatabase.CreateAsset(abConfig, "Assets/Editor Default resources/AM/AssetBundlesConfig.asset");
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();
            }
            Selection.activeObject = abConfig;
            return(abConfig);
        }
Beispiel #3
0
        public static void DeleteABName()
        {
            AssetBundlesConfig abConfig = AddABConfig();

            abConfig.allAssetConfig.Clear();
        }