Skip to content

Commit c1fb9ca

Browse files
committed
[增加] 包ID的处理
1 parent 9346a23 commit c1fb9ca

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

Editor/Builder.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ private static void BuildParamsParse()
138138
{
139139
_builderOptions.WeChatBotKey = commandLineArgs[index + 1];
140140
}
141+
else if (commandLineArg == "-BundleId")
142+
{
143+
_builderOptions.BundleId = commandLineArgs[index + 1];
144+
}
141145
}
142146

143147
if (_builderOptions.ExecuteMethod.IsNullOrWhiteSpace())
@@ -159,6 +163,10 @@ private static void BuildParamsParse()
159163
Debug.Log("-----------构建参数开始-----------");
160164
Debug.Log(_builderOptions);
161165
Debug.Log("-----------构建参数结束-----------");
166+
if (!_builderOptions.BundleId.IsNullOrWhiteSpace())
167+
{
168+
PlayerSettings.applicationIdentifier = _builderOptions.BundleId.Trim();
169+
}
162170
}
163171

164172
public static void BuildDouYin()

Editor/BuilderOptions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ internal sealed class BuilderOptions
4949
/// </summary>
5050
public string ChannelName { get; set; } = "default";
5151

52+
/// <summary>
53+
/// 包名,默认值为空,如果为空则使用项目的包名
54+
/// </summary>
55+
public string BundleId { get; set; } = string.Empty;
56+
5257
/// <summary>
5358
/// 是否上传日志文件
5459
/// </summary>

0 commit comments

Comments
 (0)