From a67e179c57c75126d12ad005539097980f3db5e3 Mon Sep 17 00:00:00 2001 From: hch <305670599@qq.com> Date: 星期一, 15 九月 2025 15:32:43 +0800 Subject: [PATCH] 0312 打包不修改代码里的版本号,后续要对版本号进行管理;安卓有对闪图特殊处理后续排查;新资源都放UI目录下 --- Assets/Editor/Tool/ClientPackage.cs | 46 +++++++++++++++++++++++----------------------- 1 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Assets/Editor/Tool/ClientPackage.cs b/Assets/Editor/Tool/ClientPackage.cs index 2b9e3a4..7bf2597 100644 --- a/Assets/Editor/Tool/ClientPackage.cs +++ b/Assets/Editor/Tool/ClientPackage.cs @@ -405,23 +405,23 @@ var versionName = string.Empty; var versionConfig = GetVersionConfig(_publisher, out versionName); - var versionConfigCSpath = Application.dataPath + "/Scripts/System/ClientVersion/VersionConfig.cs"; - var text = File.ReadAllText(versionConfigCSpath); + // var versionConfigCSpath = Application.dataPath + "/Scripts/System/ClientVersion/VersionConfig.cs"; + // var text = File.ReadAllText(versionConfigCSpath); - if (text.Contains("VERSION_ALTERNATIVE")) - { - var pattern = "VERSION_ALTERNATIVE = \".*\""; - text = Regex.Replace(text, pattern, StringUtility.Contact("VERSION_ALTERNATIVE = ", "\"", versionConfig.m_Version, "\"")); + // if (text.Contains("VERSION_ALTERNATIVE")) + // { + // var pattern = "VERSION_ALTERNATIVE = \".*\""; + // text = Regex.Replace(text, pattern, StringUtility.Contact("VERSION_ALTERNATIVE = ", "\"", versionConfig.m_Version, "\"")); - bool encoderShouldEmitUTF8Identifier = true; - bool throwOnInvalidBytes = false; - UTF8Encoding encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier, throwOnInvalidBytes); - bool append = false; - StreamWriter streamWriter = new StreamWriter(versionConfigCSpath, append, encoding); - streamWriter.Write(text); - streamWriter.Close(); - AssetDatabase.ImportAsset(versionConfigCSpath); - } + // bool encoderShouldEmitUTF8Identifier = true; + // bool throwOnInvalidBytes = false; + // UTF8Encoding encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier, throwOnInvalidBytes); + // bool append = false; + // StreamWriter streamWriter = new StreamWriter(versionConfigCSpath, append, encoding); + // streamWriter.Write(text); + // streamWriter.Close(); + // AssetDatabase.ImportAsset(versionConfigCSpath); + // } // 閽堝鏌愪竴浜涙墦鍖呯殑鐗规畩鎬�, 杩欓噷鐗规寚渚濊禆鐨勭涓夋柟搴撳惈鏈夎祫婧愮殑闂 // 杩欓噷瀵规湁杩欑鐗瑰瀷鐨勬笭閬撶殑sdk鍦ㄦ墦鍖呯殑鏃跺�欏樊寮傚寲gradle鏂囦欢 @@ -741,15 +741,15 @@ var splashScreenLogo = PlayerSettings.SplashScreenLogo.Create(3, splashImage); PlayerSettings.SplashScreen.logos = new PlayerSettings.SplashScreenLogo[] { splashScreenLogo }; - if (buildTarget == BuildTargetGroup.Android) - { - var projectSettings = new SerializedObject(AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/ProjectSettings.asset")[0]); - var splashImageSetting = projectSettings.FindProperty("androidSplashScreen"); - splashImageSetting.objectReferenceValue = splashImage.texture; - projectSettings.ApplyModifiedProperties(); + // if (buildTarget == BuildTargetGroup.Android) + // { + // var projectSettings = new SerializedObject(AssetDatabase.LoadAllAssetsAtPath("ProjectSettings/ProjectSettings.asset")[0]); + // var splashImageSetting = projectSettings.FindProperty("androidSplashScreen"); + // splashImageSetting.objectReferenceValue = splashImage.texture; + // projectSettings.ApplyModifiedProperties(); - PlayerSettings.Android.splashScreenScale = AndroidSplashScreenScale.ScaleToFill; - } + // PlayerSettings.Android.splashScreenScale = AndroidSplashScreenScale.ScaleToFill; + // } } public static void SetCreateRoleAnimation() -- Gitblit v1.8.0