com.typhoon.unitysdk 1.1.25 → 1.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/Editor/ApplyTool.cs +17 -0
- package/Editor/UniEditor.cs +12 -0
- package/Editor/YandexGamesConfig.cs +32 -2
- package/Runtime/LabelOverride.cs +1 -1
- package/Sources~/Package/YandexGames.unitypackage +0 -0
- package/Sources~/Package/YandexGames.unitypackage.manifest +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/Editor/ApplyTool.cs
CHANGED
|
@@ -925,6 +925,23 @@ namespace TyphoonUnitySDK
|
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
ReimportScript(manifest);
|
|
928
|
+
//同步参数到PlayerSettings
|
|
929
|
+
var config = YandexGamesConfig.Default;
|
|
930
|
+
if (!string.IsNullOrEmpty(config.ProductName))
|
|
931
|
+
{
|
|
932
|
+
PlayerSettings.productName = config.ProductName;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
if (!string.IsNullOrEmpty(config.CompanyName))
|
|
936
|
+
{
|
|
937
|
+
PlayerSettings.companyName = config.CompanyName;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
PlayerSettings.bundleVersion = config.PackageVersion;
|
|
941
|
+
PlayerSettings.SetIconsForTargetGroup(
|
|
942
|
+
BuildTargetGroup.Unknown, // 👈 关键
|
|
943
|
+
new[] { config.ProductIcon }
|
|
944
|
+
);
|
|
928
945
|
AssetDatabase.Refresh();
|
|
929
946
|
EditorUtility.SetDirty(AppConfigAsset.Instance);
|
|
930
947
|
AssetDatabase.SaveAssets();
|
package/Editor/UniEditor.cs
CHANGED
|
@@ -454,6 +454,18 @@ namespace TyphoonUnitySDK
|
|
|
454
454
|
return version;
|
|
455
455
|
}
|
|
456
456
|
|
|
457
|
+
/// <summary>
|
|
458
|
+
/// 判断版本号是否合规
|
|
459
|
+
/// </summary>
|
|
460
|
+
public static bool IsMatchVersionString(string version)
|
|
461
|
+
{
|
|
462
|
+
if (string.IsNullOrEmpty(version))
|
|
463
|
+
return false;
|
|
464
|
+
|
|
465
|
+
// 数字(.数字)* —— 保证不以 . 开头/结尾,也不会出现 ..
|
|
466
|
+
return Regex.IsMatch(version, @"^\d+(\.\d+)*$");
|
|
467
|
+
}
|
|
468
|
+
|
|
457
469
|
|
|
458
470
|
/// <summary>
|
|
459
471
|
/// 复制文件夹
|
|
@@ -12,6 +12,7 @@ namespace TyphoonUnitySDK
|
|
|
12
12
|
new Dictionary<string, Func<YandexGamesConfig, bool>>()
|
|
13
13
|
{
|
|
14
14
|
{ "m_Script", DrawProperty_m_Script },
|
|
15
|
+
{ "PackageVersion", DrawProperty_PackageVersion },
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
|
|
@@ -22,11 +23,28 @@ namespace TyphoonUnitySDK
|
|
|
22
23
|
GUILayout.Space(6);
|
|
23
24
|
GUIDrawer.DrawKeynotes("①支持Unity 2021.3.18+ , 2022.3+ , 2023.2+ , Unity 6");
|
|
24
25
|
GUIDrawer.DrawKeynotes("②剔除第三方SDK,避免与渠道冲突或不兼容");
|
|
26
|
+
GUIDrawer.DrawKeynotes("③先应用后再打包,避免参数写入失败");
|
|
25
27
|
GUILayout.Space(6);
|
|
26
28
|
GUI.enabled = tmpEnable;
|
|
27
29
|
return true;
|
|
28
30
|
}
|
|
29
31
|
|
|
32
|
+
public static bool DrawProperty_PackageVersion(YandexGamesConfig arg)
|
|
33
|
+
{
|
|
34
|
+
GUILayout.BeginHorizontal();
|
|
35
|
+
GUILayout.Label("Package Version", GUILayout.Width(218));
|
|
36
|
+
arg.PackageVersion = EditorGUILayout.TextField("", arg.PackageVersion);
|
|
37
|
+
if (GUILayout.Button("自动版本号", GUILayout.Width(100)))
|
|
38
|
+
{
|
|
39
|
+
arg.PackageVersion = UniEditor.AutoVersionSting(arg.PackageVersion);
|
|
40
|
+
EditorUtility.SetDirty(arg);
|
|
41
|
+
GUI.FocusControl("");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
GUILayout.EndHorizontal();
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
|
|
30
48
|
|
|
31
49
|
/*绘制GUI*/
|
|
32
50
|
public static void DrawGUI()
|
|
@@ -83,8 +101,20 @@ namespace TyphoonUnitySDK
|
|
|
83
101
|
[LabelOverride("激励视频播放后跳过下一次插页广告", 220)]
|
|
84
102
|
public bool SkipIntersAfterShowRewardFlag = true;
|
|
85
103
|
|
|
86
|
-
[LabelOverride("
|
|
87
|
-
public
|
|
104
|
+
[LabelOverride("Product Icon", 220)]
|
|
105
|
+
public Texture2D ProductIcon;
|
|
106
|
+
|
|
107
|
+
[LabelOverride("Product Name (非中文)", 220)]
|
|
108
|
+
public string ProductName = string.Empty;
|
|
109
|
+
|
|
110
|
+
[LabelOverride("Company Name (非中文)", 220)]
|
|
111
|
+
public string CompanyName = string.Empty;
|
|
112
|
+
|
|
113
|
+
public string PackageVersion = "1.0.0";
|
|
114
|
+
|
|
115
|
+
[LabelOverride("导出目录 (非中文,可选)", 220)]
|
|
116
|
+
public string ExportPath = "";
|
|
117
|
+
|
|
88
118
|
|
|
89
119
|
public void Save()
|
|
90
120
|
{
|
package/Runtime/LabelOverride.cs
CHANGED
|
Binary file
|
|
@@ -25,6 +25,8 @@ Assets/PluginYourGames/Third-Party Notices.txt
|
|
|
25
25
|
Assets/PluginYourGames/Third-Party Notices.txt.meta
|
|
26
26
|
Assets/PluginYourGames/Version.txt
|
|
27
27
|
Assets/PluginYourGames/Version.txt.meta
|
|
28
|
+
Assets/PluginYourGames/Editor/BuildLogYG2.txt
|
|
29
|
+
Assets/PluginYourGames/Editor/BuildLogYG2.txt.meta
|
|
28
30
|
Assets/PluginYourGames/Editor/ModulesListYG2.txt
|
|
29
31
|
Assets/PluginYourGames/Editor/ModulesListYG2.txt.meta
|
|
30
32
|
Assets/PluginYourGames/Editor/PluginPrefs.json
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.1.
|
|
1
|
+
{"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.1.26","description":"","unity":"2018.1","type":"tool","hideInEditor":false,"author":{"name":"Jan Zhang","email":"","url":""},"changelogUrl":"","documentationUrl":"","keywords":["typhoon"],"license":"","licensesUrl":"","customDependencies":[{"PackageName":"com.unity.nuget.newtonsoft-json","Value":"2.0.0"}],"version_log":"## [1.1.26] - 2026-01-05\r\n\r\n### 新增\n* 补充yandex games 打包参数设置\r\n\r\n","major_flag":false,"write_time_stamp":1767601798000,"others":{"items":[]},"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}
|