三国卡牌客户端基础资源仓库
hch
5 天以前 c3771e0399e604e9a2cfe0124f901ed01fcfd7d7
257 子 【配套功能】新手引导 / 【常规】引导  - 打包
2个文件已修改
48 ■■■■ 已修改文件
Assets/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/Tool/UpdateAssetBundleName.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
@@ -678,6 +678,7 @@
        private void ExcuteBuildConfig()
        {
            UpdateScriptableObjectsSetting.SetAllScriptableObjectAssetBundleName();
            ExcuteBuildAsset("config");
            TableTool.CopyConfigsToOutPutPath(StringUtility.Contact(m_UserData.m_OutputPath, "/config"));
            Debug.Log("config 处理完成");
Assets/Editor/Tool/UpdateAssetBundleName.cs
@@ -7,7 +7,7 @@
public class UpdateAllSetting
{
    [MenuItem("程序/设置资源包名/更新全部ABLabel(不包括lua)")]
    [MenuItem("程序/设置资源包名/更新全部ABLabel")]
    public static void SetAllAssetBundleName()
    {
        UpdateSpriteSetting.SetAllSpriteAssetBundleName();
@@ -20,6 +20,7 @@
        UpdateAudioSetting.SetAllAudioAssetBundleName();
        UpdateVideoSetting.SetAllVideoAssetBundleName();
        UpdateBuiltInSetting.SetBuiltinAssetBundleName();
        UpdateScriptableObjectsSetting.SetAllScriptableObjectAssetBundleName();
        AssetDatabase.Refresh();
        Debug.Log("资源包名全部更新完成!");
    }
@@ -301,32 +302,28 @@
public class UpdateScriptableObjectsSetting
{
    // static string rootPath = Application.dataPath + "/ResourcesOut/Refdata/ScriptableObject/";
    // static string assetPath = "Assets/ResourcesOut/Refdata/ScriptableObject/";
    // static string[] relativePaths = new string[] { "SoTreasure3D", "SoTreasureMeridian", "SoActor", "SoDeadFly", "SoBodyControl",
    //     "SoCameraSFX", "SoFlyObject", "SoSkill", "SoSweepHit", "SoGhostShadow", "SoNewBieGuide", "SoMapObjectGenerate","SoDemonDungeon",
    //     "SoHazyMapNpc","SoProcessNode"};
    static string rootPath = Application.dataPath + "/ResourcesOut/ScriptableObject/";
    static string assetPath = "Assets/ResourcesOut/ScriptableObject/";
    static string[] relativePaths = new string[] { "NewBieGuide"};
    // [MenuItem("程序/设置资源包名/更新ScriptableObject(All) AssetBundleName")]
    // public static void SetAllScriptableObjectAssetBundleName()
    // {
    //     for (int i = 0; i < relativePaths.Length; i++)
    //     {
    //         var relativePath = relativePaths[i];
    //         var allFiles = new DirectoryInfo(rootPath + relativePath).GetFiles("*.asset", SearchOption.TopDirectoryOnly);
    [MenuItem("程序/设置资源包名/更新ScriptableObject(All) AssetBundleName")]
    public static void SetAllScriptableObjectAssetBundleName()
    {
        for (int i = 0; i < relativePaths.Length; i++)
        {
            var relativePath = relativePaths[i];
            var allFiles = new DirectoryInfo(rootPath + relativePath).GetFiles("*.asset", SearchOption.TopDirectoryOnly);
    //         foreach (var file in allFiles)
    //         {
    //             var importerPath = assetPath + relativePath + Path.DirectorySeparatorChar + file.Name;
    //             var importer = AssetImporter.GetAtPath(importerPath);
    //             importer.assetBundleName = "config/scriptableobjects";
    //             // EditorUtility.SetDirty(importer);
    //         }
    //     }
    //     Debug.Log("ScriptableObject资源包名更新完成!");
    //     // AssetDatabase.SaveAssets();
    //     // AssetDatabase.Refresh();
    // }
            foreach (var file in allFiles)
            {
                var importerPath = assetPath + relativePath + Path.DirectorySeparatorChar + file.Name;
                var importer = AssetImporter.GetAtPath(importerPath);
                //放置在config下
                importer.assetBundleName = "config/scriptableobject";
            }
        }
        Debug.Log("ScriptableObject资源包名更新完成! 放置在config下");
    }
}
public class UpdateLevelSetting