Пример #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());
        }
Пример #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);
        }
Пример #3
0
        public static void DeleteABName()
        {
            AssetBundlesConfig abConfig = AddABConfig();

            abConfig.allAssetConfig.Clear();
        }