【m】APK打包工具添加App名称修改功能

This commit is contained in:
fennecmomoalias
2026-03-30 15:53:21 +08:00
parent 0691cb632b
commit ecfaf9c6b5
2 changed files with 10 additions and 3 deletions

View File

@@ -36,6 +36,10 @@ namespace Stary.Evo.Editor
[OnValueChanged("OnPackageNameChanged")]
public string selectedPackageName;
[LabelText("自定义App名称")]
[Tooltip("空置时为默认名")]
public string productNameReplace;
[TitleGroup("打包配置", alignment: TitleAlignments.Centered)] [ToggleLeft] [LabelText("自动递增版本号")]
public bool autoIncrementVersion = true;
@@ -226,7 +230,7 @@ namespace Stary.Evo.Editor
packageName = selectedPackageName;
}
PlayerSettings.productName = productName;
PlayerSettings.productName = productNameReplace.IsNullOrEmpty() ? productName : productNameReplace;
PlayerSettings.applicationIdentifier = packageName;
// 自动递增版本号
@@ -292,8 +296,11 @@ namespace Stary.Evo.Editor
/// 配置水印信息
/// </summary>
private void ConfigureWatermark()
{
if (productNameReplace.IsNullOrEmpty())
{
PlayerSettings.productName += "_watermark";
}
PlayerSettings.applicationIdentifier += "_watermark";
Sprite logoSprite = Resources.Load<Sprite>("logo");

View File

@@ -1,6 +1,6 @@
{
"name": "com.staryevo.tools",
"version": "1.3.29",
"version": "1.3.30",
"displayName": "00.StaryEvo.Tools",
"description": "This is an Framework package(后台服务器版本端口9527)",
"unity": "2021.3",