com.typhoon.unitysdk 1.0.2

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.
Files changed (207) hide show
  1. package/Editor/AddressableSupport.cs +269 -0
  2. package/Editor/AddressableSupport.cs.meta +11 -0
  3. package/Editor/ApplyTool.cs +315 -0
  4. package/Editor/ApplyTool.cs.meta +11 -0
  5. package/Editor/EditorIcons.cs +113 -0
  6. package/Editor/EditorIcons.cs.meta +11 -0
  7. package/Editor/ExportModule.cs +218 -0
  8. package/Editor/ExportModule.cs.meta +11 -0
  9. package/Editor/InstallModule.cs +38 -0
  10. package/Editor/InstallModule.cs.meta +11 -0
  11. package/Editor/Interactive/SDKInteractiveUI.prefab +3026 -0
  12. package/Editor/Interactive/SDKInteractiveUI.prefab.meta +7 -0
  13. package/Editor/Interactive/sdk_banner.png +0 -0
  14. package/Editor/Interactive/sdk_banner.png.meta +144 -0
  15. package/Editor/Interactive/sdk_close.png +0 -0
  16. package/Editor/Interactive/sdk_close.png.meta +120 -0
  17. package/Editor/Interactive/sdk_inters.png +0 -0
  18. package/Editor/Interactive/sdk_inters.png.meta +120 -0
  19. package/Editor/Interactive/sdk_white_4x4.png +0 -0
  20. package/Editor/Interactive/sdk_white_4x4.png.meta +120 -0
  21. package/Editor/Interactive/sdk_/345/244/261/350/264/245/350/277/224/345/233/236.png +0 -0
  22. package/Editor/Interactive/sdk_/345/244/261/350/264/245/350/277/224/345/233/236.png.meta +120 -0
  23. package/Editor/Interactive/sdk_/346/202/254/346/265/256/345/271/277/345/221/212.png +0 -0
  24. package/Editor/Interactive/sdk_/346/202/254/346/265/256/345/271/277/345/221/212.png.meta +120 -0
  25. package/Editor/Interactive/sdk_/346/210/220/345/212/237/350/277/224/345/233/236.png +0 -0
  26. package/Editor/Interactive/sdk_/346/210/220/345/212/237/350/277/224/345/233/236.png.meta +120 -0
  27. package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/345/216/237/347/224/237/346/250/241/346/235/277.png +0 -0
  28. package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/345/216/237/347/224/237/346/250/241/346/235/277.png.meta +120 -0
  29. package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/346/217/222/351/241/265/345/271/277/345/221/212.png +0 -0
  30. package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/346/217/222/351/241/265/345/271/277/345/221/212.png.meta +120 -0
  31. package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/350/247/206/351/242/221/345/271/277/345/221/212.png +0 -0
  32. package/Editor/Interactive/sdk_/350/277/231/346/230/257/344/270/200/344/270/252/350/247/206/351/242/221/345/271/277/345/221/212.png.meta +120 -0
  33. package/Editor/Interactive.meta +8 -0
  34. package/Editor/OnApplyProcessor.cs +22 -0
  35. package/Editor/OnApplyProcessor.cs.meta +11 -0
  36. package/Editor/OnBuildAAProcessor.cs +12 -0
  37. package/Editor/OnBuildAAProcessor.cs.meta +11 -0
  38. package/Editor/OnPublicProcessor.cs +12 -0
  39. package/Editor/OnPublicProcessor.cs.meta +11 -0
  40. package/Editor/OriginalStyles.cs +708 -0
  41. package/Editor/OriginalStyles.cs.meta +11 -0
  42. package/Editor/Preferences.cs +43 -0
  43. package/Editor/Preferences.cs.meta +11 -0
  44. package/Editor/PreferencesWindow.cs +178 -0
  45. package/Editor/PreferencesWindow.cs.meta +11 -0
  46. package/Editor/PropertyInspectorEditor.cs +6 -0
  47. package/Editor/PropertyInspectorEditor.cs.meta +11 -0
  48. package/Editor/PublishProcess.cs +13 -0
  49. package/Editor/PublishProcess.cs.meta +11 -0
  50. package/Editor/PublishResult.cs +17 -0
  51. package/Editor/PublishResult.cs.meta +11 -0
  52. package/Editor/PublishSetting.cs +111 -0
  53. package/Editor/PublishSetting.cs.meta +11 -0
  54. package/Editor/PublishSettingGUIDrawer.cs +412 -0
  55. package/Editor/PublishSettingGUIDrawer.cs.meta +11 -0
  56. package/Editor/PublishSettingInspector.cs +29 -0
  57. package/Editor/PublishSettingInspector.cs.meta +11 -0
  58. package/Editor/PublishTool.cs +137 -0
  59. package/Editor/PublishTool.cs.meta +11 -0
  60. package/Editor/PublishVivoBatSetting.cs +62 -0
  61. package/Editor/PublishVivoBatSetting.cs.meta +11 -0
  62. package/Editor/PublishVivoBatSettingInspector.cs +371 -0
  63. package/Editor/PublishVivoBatSettingInspector.cs.meta +11 -0
  64. package/Editor/PublishVivoBatSettingWindow.cs +69 -0
  65. package/Editor/PublishVivoBatSettingWindow.cs.meta +11 -0
  66. package/Editor/PublishWindow.cs +364 -0
  67. package/Editor/PublishWindow.cs.meta +11 -0
  68. package/Editor/SdkFont.otf +0 -0
  69. package/Editor/SdkFont.otf.meta +21 -0
  70. package/Editor/SdkTestInUnityEditor.cs +20 -0
  71. package/Editor/SdkTestInUnityEditor.cs.meta +11 -0
  72. package/Editor/SdkTestInUnityWindow.cs +37 -0
  73. package/Editor/SdkTestInUnityWindow.cs.meta +11 -0
  74. package/Editor/Skin.guiskin +2673 -0
  75. package/Editor/Skin.guiskin.meta +8 -0
  76. package/Editor/Skins.cs +26 -0
  77. package/Editor/Skins.cs.meta +11 -0
  78. package/Editor/StyleEditorWindow.cs +23 -0
  79. package/Editor/StyleEditorWindow.cs.meta +11 -0
  80. package/Editor/Styles.cs +52 -0
  81. package/Editor/Styles.cs.meta +11 -0
  82. package/Editor/StylesExtension.cs +25 -0
  83. package/Editor/StylesExtension.cs.meta +11 -0
  84. package/Editor/Texture/btn_active.png +0 -0
  85. package/Editor/Texture/btn_active.png.meta +120 -0
  86. package/Editor/Texture/btn_blue_active.png +0 -0
  87. package/Editor/Texture/btn_blue_active.png.meta +120 -0
  88. package/Editor/Texture/btn_blue_hover.png +0 -0
  89. package/Editor/Texture/btn_blue_hover.png.meta +120 -0
  90. package/Editor/Texture/btn_blue_normal.png +0 -0
  91. package/Editor/Texture/btn_blue_normal.png.meta +120 -0
  92. package/Editor/Texture/btn_green_active.png +0 -0
  93. package/Editor/Texture/btn_green_active.png.meta +120 -0
  94. package/Editor/Texture/btn_green_hover.png +0 -0
  95. package/Editor/Texture/btn_green_hover.png.meta +120 -0
  96. package/Editor/Texture/btn_green_normal.png +0 -0
  97. package/Editor/Texture/btn_green_normal.png.meta +120 -0
  98. package/Editor/Texture/btn_hover.png +0 -0
  99. package/Editor/Texture/btn_hover.png.meta +120 -0
  100. package/Editor/Texture/btn_normal.png +0 -0
  101. package/Editor/Texture/btn_normal.png.meta +120 -0
  102. package/Editor/Texture/btn_yellow_active.png +0 -0
  103. package/Editor/Texture/btn_yellow_active.png.meta +120 -0
  104. package/Editor/Texture/btn_yellow_hover.png +0 -0
  105. package/Editor/Texture/btn_yellow_hover.png.meta +120 -0
  106. package/Editor/Texture/btn_yellow_normal.png +0 -0
  107. package/Editor/Texture/btn_yellow_normal.png.meta +120 -0
  108. package/Editor/Texture/icon_android.png +0 -0
  109. package/Editor/Texture/icon_android.png.meta +120 -0
  110. package/Editor/Texture/icon_douyin.png +0 -0
  111. package/Editor/Texture/icon_douyin.png.meta +120 -0
  112. package/Editor/Texture/icon_download.png +0 -0
  113. package/Editor/Texture/icon_download.png.meta +120 -0
  114. package/Editor/Texture/icon_error.png +0 -0
  115. package/Editor/Texture/icon_error.png.meta +144 -0
  116. package/Editor/Texture/icon_extension.png +0 -0
  117. package/Editor/Texture/icon_extension.png.meta +120 -0
  118. package/Editor/Texture/icon_googleplay.png +0 -0
  119. package/Editor/Texture/icon_googleplay.png.meta +120 -0
  120. package/Editor/Texture/icon_html5.png +0 -0
  121. package/Editor/Texture/icon_html5.png.meta +120 -0
  122. package/Editor/Texture/icon_import.png +0 -0
  123. package/Editor/Texture/icon_import.png.meta +144 -0
  124. package/Editor/Texture/icon_ios.png +0 -0
  125. package/Editor/Texture/icon_ios.png.meta +120 -0
  126. package/Editor/Texture/icon_oppo.png +0 -0
  127. package/Editor/Texture/icon_oppo.png.meta +120 -0
  128. package/Editor/Texture/icon_refresh.png +0 -0
  129. package/Editor/Texture/icon_refresh.png.meta +120 -0
  130. package/Editor/Texture/icon_save.png +0 -0
  131. package/Editor/Texture/icon_save.png.meta +120 -0
  132. package/Editor/Texture/icon_success.png +0 -0
  133. package/Editor/Texture/icon_success.png.meta +144 -0
  134. package/Editor/Texture/icon_vivo.png +0 -0
  135. package/Editor/Texture/icon_vivo.png.meta +120 -0
  136. package/Editor/Texture/icon_wechat.png +0 -0
  137. package/Editor/Texture/icon_wechat.png.meta +120 -0
  138. package/Editor/Texture/tex_select.png +0 -0
  139. package/Editor/Texture/tex_select.png.meta +120 -0
  140. package/Editor/Texture.meta +8 -0
  141. package/Editor/UniEditor.cs +451 -0
  142. package/Editor/UniEditor.cs.meta +11 -0
  143. package/Editor/com.typhoon.unitysdk.editor.asmdef +20 -0
  144. package/Editor/com.typhoon.unitysdk.editor.asmdef.meta +7 -0
  145. package/Editor.meta +8 -0
  146. package/Runtime/AndroidInstance.cs +125 -0
  147. package/Runtime/AndroidInstance.cs.meta +11 -0
  148. package/Runtime/AppChannel.cs +55 -0
  149. package/Runtime/AppChannel.cs.meta +11 -0
  150. package/Runtime/AppConfig.cs +28 -0
  151. package/Runtime/AppConfig.cs.meta +11 -0
  152. package/Runtime/AppConfigAsset.cs +50 -0
  153. package/Runtime/AppConfigAsset.cs.meta +11 -0
  154. package/Runtime/BannerPosition.cs +11 -0
  155. package/Runtime/BannerPosition.cs.meta +11 -0
  156. package/Runtime/BaseSdk.cs +78 -0
  157. package/Runtime/BaseSdk.cs.meta +11 -0
  158. package/Runtime/Extension.cs +58 -0
  159. package/Runtime/Extension.cs.meta +11 -0
  160. package/Runtime/Interface.cs +115 -0
  161. package/Runtime/Interface.cs.meta +11 -0
  162. package/Runtime/MonoSingleton.cs +76 -0
  163. package/Runtime/MonoSingleton.cs.meta +11 -0
  164. package/Runtime/Resources/TYPHOON_SDK_TEST.prefab +45 -0
  165. package/Runtime/Resources/TYPHOON_SDK_TEST.prefab.meta +7 -0
  166. package/Runtime/Resources.meta +8 -0
  167. package/Runtime/SDKInteractiveUI.cs +353 -0
  168. package/Runtime/SDKInteractiveUI.cs.meta +11 -0
  169. package/Runtime/SdkDebug.cs +23 -0
  170. package/Runtime/SdkDebug.cs.meta +11 -0
  171. package/Runtime/SdkTestInUnity.cs +45 -0
  172. package/Runtime/SdkTestInUnity.cs.meta +11 -0
  173. package/Runtime/SessionItem.cs +72 -0
  174. package/Runtime/SessionItem.cs.meta +11 -0
  175. package/Runtime/SimpleMap.cs +11 -0
  176. package/Runtime/SimpleMap.cs.meta +11 -0
  177. package/Runtime/TestSdk.cs +22 -0
  178. package/Runtime/TestSdk.cs.meta +11 -0
  179. package/Runtime/TyphoonSdk.cs +407 -0
  180. package/Runtime/TyphoonSdk.cs.meta +11 -0
  181. package/Runtime/TyphoonSdkCallback.cs +48 -0
  182. package/Runtime/TyphoonSdkCallback.cs.meta +11 -0
  183. package/Runtime/VersionType.cs +33 -0
  184. package/Runtime/VersionType.cs.meta +11 -0
  185. package/Runtime/com.typhoon.unitysdk.asmdef +3 -0
  186. package/Runtime/com.typhoon.unitysdk.asmdef.meta +7 -0
  187. package/Runtime.meta +8 -0
  188. package/Sources~/ChinaAndroid/Assets/Plugins/Android/AndroidManifest.xml +18 -0
  189. package/Sources~/ChinaAndroid/Assets/Plugins/Android/AndroidManifest.xml.meta +7 -0
  190. package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/sdk_plug-release.aar +0 -0
  191. package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/sdk_plug-release.aar.meta +32 -0
  192. package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/unity_app-release.aar +0 -0
  193. package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/unity_app-release.aar.meta +32 -0
  194. package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/unity_launcher-release.aar +0 -0
  195. package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/unity_launcher-release.aar.meta +32 -0
  196. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/ChinaAndroidSdk.cs +154 -0
  197. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/ChinaAndroidSdk.cs.meta +11 -0
  198. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor/PublishChinaAndroidAAR.cs +56 -0
  199. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor/PublishChinaAndroidAAR.cs.meta +11 -0
  200. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor.meta +8 -0
  201. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources/TYPHOON_SDK_CHINA_ANDROID.prefab +45 -0
  202. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources/TYPHOON_SDK_CHINA_ANDROID.prefab.meta +7 -0
  203. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources.meta +8 -0
  204. package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid.meta +8 -0
  205. package/Sources~/Package//345/270/270/347/224/250/346/211/223/345/214/205/351/205/215/347/275/256.unitypackage +0 -0
  206. package/package.json +1 -0
  207. package/package.json.meta +7 -0
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 7864f812c805f2748988ce8e35f22414
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,43 @@
1
+ using System.IO;
2
+ using UnityEditor;
3
+ using UnityEngine;
4
+
5
+ namespace TyphoonUnitySDK
6
+ {
7
+ /// <summary>
8
+ /// 偏好设置
9
+ /// </summary>
10
+ public partial class Preferences : ScriptableObject
11
+ {
12
+ public static string AssetPath = "Assets/Typhoon_Gen/TyphoonSDK/Editor/Preferences.asset";
13
+
14
+ private static Preferences _instance = null;
15
+
16
+ public static Preferences Default
17
+ {
18
+ get
19
+ {
20
+ if (_instance == null)
21
+ {
22
+ _instance = AssetDatabase.LoadAssetAtPath<Preferences>(AssetPath);
23
+ }
24
+
25
+ if (_instance == null)
26
+ {
27
+ _instance = CreateInstance<Preferences>();
28
+ UniEditor.CreateDirIfNotExist(Path.GetDirectoryName(AssetPath));
29
+ AssetDatabase.CreateAsset(_instance, AssetPath);
30
+ UniEditor.LogInfo($"生成:{AssetPath}");
31
+ }
32
+
33
+ return _instance;
34
+ }
35
+ }
36
+
37
+ [Header("检查拓展Addressable开关")]
38
+ /*检查Addressable Plug安装*/
39
+ public bool CheckInstallAddressablePlug = true;
40
+
41
+ [Header("gradle目录")] public string GradlePath = string.Empty;
42
+ }
43
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 3a7b882172843634194ff61ccfd03be8
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,178 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.IO;
4
+ using UnityEditor;
5
+ using UnityEngine;
6
+ using Object = UnityEngine.Object;
7
+
8
+ namespace TyphoonUnitySDK
9
+ {
10
+ public class PreferencesWindow : StyleEditorWindow
11
+ {
12
+ /// <summary>
13
+ /// 绑定重绘逻辑
14
+ /// </summary>
15
+ public static Dictionary<string, Func<Preferences, bool>> RedrawBinding =
16
+ new Dictionary<string, Func<Preferences, bool>>()
17
+ {
18
+ { "m_Script", (s) => true },
19
+ { nameof(Preferences.GradlePath), DrawProperty_GradlePath },
20
+ };
21
+
22
+
23
+ [MenuItem("TyphoonSDK/选项", priority = 10000)]
24
+ public static void Open()
25
+ {
26
+ var win = GetWindow<PreferencesWindow>();
27
+ win.titleContent = new GUIContent("选项");
28
+ win.minSize = new Vector2(650, 500);
29
+ win.Show();
30
+ }
31
+
32
+ private Editor _editor;
33
+
34
+ public Editor Editor
35
+ {
36
+ get
37
+ {
38
+ if (_editor != null && _editor.target != Preferences.Default)
39
+ {
40
+ DestroyImmediate(_editor);
41
+ }
42
+
43
+ if (_editor == null)
44
+ {
45
+ _editor = Editor.CreateEditor(Preferences.Default);
46
+ }
47
+
48
+ return _editor;
49
+ }
50
+ }
51
+
52
+
53
+ protected override void OnDrawGUI()
54
+ {
55
+ base.OnDrawGUI();
56
+ var rect = new Rect(0, 0, position.width, position.height);
57
+ var area = rect;
58
+ area.height -= 8;
59
+ area.width -= 12;
60
+ area.center = rect.center;
61
+ GUILayout.BeginArea(area);
62
+ var rectSave = new Rect(0, 0, area.width, area.height);
63
+ rectSave.width = 100;
64
+ rectSave.height = 32;
65
+ rectSave.x = area.width - rectSave.width;
66
+ rectSave.x -= 4;
67
+ rectSave.y += 4;
68
+ if (GUI.Button(rectSave, new GUIContent("保存配置", EditorIcons.icon_save), Styles.rbutton_green))
69
+ {
70
+ EditorUtility.SetDirty(Preferences.Default);
71
+ AssetDatabase.SaveAssets();
72
+ Debug.Log("保存完毕");
73
+ }
74
+
75
+ DrawPropertyGUI(Preferences.Default);
76
+ GUILayout.EndArea();
77
+ Repaint();
78
+ }
79
+
80
+
81
+ /*绘制GUI*/
82
+ public static void DrawPropertyGUI(Preferences preferences)
83
+ {
84
+ DrawProperty(preferences, (property) =>
85
+ {
86
+ if (RedrawBinding.TryGetValue(property, out var match))
87
+ {
88
+ return match.Invoke(preferences);
89
+ }
90
+
91
+ return false;
92
+ });
93
+ }
94
+
95
+
96
+ /*绘制属性*/
97
+ public static void DrawProperty(Object target, Func<string, bool> ignoreFunc)
98
+ {
99
+ var obj = new SerializedObject(target);
100
+ EditorGUI.BeginChangeCheck();
101
+ obj.UpdateIfRequiredOrScript();
102
+ SerializedProperty iterator = obj.GetIterator();
103
+ for (var enterChildren = true; iterator.NextVisible(enterChildren); enterChildren = false)
104
+ {
105
+ using (new EditorGUI.DisabledScope("m_Script" == iterator.propertyPath))
106
+ {
107
+ var cover = ignoreFunc.Invoke(iterator.propertyPath);
108
+ if (!cover)
109
+ {
110
+ EditorGUILayout.PropertyField(iterator, true);
111
+ }
112
+ }
113
+ }
114
+
115
+ obj.ApplyModifiedProperties();
116
+ EditorGUI.EndChangeCheck();
117
+ }
118
+
119
+
120
+ private static bool DrawProperty_GradlePath(Preferences preferences)
121
+ {
122
+ GUILayout.Space(10);
123
+ var error = false;
124
+ var color = GUI.color;
125
+ if (!UniEditor.GradleIsMatch())
126
+ {
127
+ GUILayout.Label(new GUIContent("未配置gradle路径", EditorIcons.icon_error), Styles.ToolbarBoldLabel,
128
+ GUILayout.Height(24));
129
+ color = GUI.color;
130
+ GUI.color = Color.green;
131
+ GUILayout.TextArea(
132
+ "目录选到bin的文件夹即可\n例如:C:\\Users\\Jan\\.gradle\\wrapper\\dists\\gradle-6.8-bin\\1jblhjyydfkclfzx1agp92nyl\\gradle-6.8\\bin");
133
+ GUI.color = color;
134
+ error = true;
135
+ }
136
+ else
137
+ {
138
+ GUILayout.Label(new GUIContent("gradle路径", EditorIcons.icon_success), Styles.ToolbarBoldLabel,
139
+ GUILayout.Height(24));
140
+ }
141
+
142
+ GUILayout.BeginHorizontal();
143
+ GUILayout.Label("目录:", Styles.ToolbarBoldLabel, GUILayout.Width(40));
144
+ color = GUI.color;
145
+ GUI.color = error ? Color.red : color;
146
+ preferences.GradlePath = GUILayout.TextArea(preferences.GradlePath, GUILayout.Height(44));
147
+ GUI.color = color;
148
+ if (GUILayout.Button("选择", GUILayout.Width(60)))
149
+ {
150
+ // 获取当前用户的 Windows 用户文件夹路径
151
+ var userFolder = UniEditor.GetWindowUserFolder();
152
+ var fastPath = "";
153
+ if (Directory.Exists(userFolder))
154
+ {
155
+ var maybe = $"{userFolder}/.gradle/wrapper/dists";
156
+ if (Directory.Exists(maybe))
157
+ {
158
+ fastPath = maybe;
159
+ }
160
+ }
161
+
162
+ var select = EditorUtility.OpenFolderPanel("请选择Gradle目录", fastPath, "");
163
+ preferences.GradlePath = select;
164
+ EditorUtility.SetDirty(preferences);
165
+ var check = $"{select}/gradle";
166
+ if (!File.Exists(check))
167
+ {
168
+ UniEditor.ShowMessageBox($"gardle目录不匹配,找不到:{check}", null);
169
+ }
170
+
171
+ GUI.FocusControl("");
172
+ }
173
+
174
+ GUILayout.EndHorizontal();
175
+ return true;
176
+ }
177
+ }
178
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 3c3032a6894ef09469ca9c9fa945d151
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,6 @@
1
+ using UnityEditor;
2
+
3
+ [CustomEditor(typeof(object))]
4
+ public class PropertyInspectorEditor : Editor
5
+ {
6
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: ff1801290840e8149bba074aa5088991
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,13 @@
1
+ namespace TyphoonUnitySDK
2
+ {
3
+ /// <summary>
4
+ /// 发布流程
5
+ /// </summary>
6
+ public enum PublishProcess
7
+ {
8
+ Apk,
9
+ IOS,
10
+ Webgl,
11
+ ChinaAndroidAAR,
12
+ }
13
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: af232aa8c7f0f4f40a901108d815cae2
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,17 @@
1
+ using System.Collections;
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+
5
+ namespace TyphoonUnitySDK
6
+ {
7
+ /// <summary>
8
+ /// 发布结果
9
+ /// </summary>
10
+ public class PublishResult
11
+ {
12
+ /// <summary>
13
+ /// 导出的android工程
14
+ /// </summary>
15
+ public string AndroidProj;
16
+ }
17
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 4daa6c904af23fd42aafa4e39213e2da
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,111 @@
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using UnityEditor;
4
+ using UnityEngine;
5
+ using UnityEngine.Rendering;
6
+ using UnityEngine.Serialization;
7
+
8
+ namespace TyphoonUnitySDK
9
+ {
10
+ /// <summary>
11
+ /// aa 参数修改
12
+ /// </summary>
13
+ [Serializable]
14
+ public class AddressableVariableModify
15
+ {
16
+ public string VariableName;
17
+ public string VariableValue;
18
+
19
+ public AddressableVariableModify(string variableName, string variableValue)
20
+ {
21
+ VariableName = variableName;
22
+ VariableValue = variableValue;
23
+ }
24
+ }
25
+
26
+ /// <summary>
27
+ /// webgl 模板
28
+ /// </summary>
29
+ public enum WebGlTemplate
30
+ {
31
+ Default,
32
+ Minimal,
33
+ }
34
+
35
+
36
+ /// <summary>
37
+ /// 发布设置
38
+ /// </summary>
39
+ [CreateAssetMenu]
40
+ public class PublishSetting : ScriptableObject
41
+ {
42
+ [Header("基础")] public BuildTarget BuildTarget;
43
+
44
+ public GraphicsDeviceType[] GraphicsAPIs;
45
+ public ScriptingImplementation ScriptingImplementation = ScriptingImplementation.IL2CPP;
46
+
47
+
48
+ public bool StripEngineCode = false;
49
+
50
+ public ManagedStrippingLevel StrippingLevel = ManagedStrippingLevel.Disabled;
51
+
52
+ #if UNITY_2021
53
+ public AndroidSdkVersions MinApiVersion = AndroidSdkVersions.AndroidApiLevel22;
54
+ #else
55
+ public AndroidSdkVersions MinApiVersion = AndroidSdkVersions.AndroidApiLevel19;
56
+ #endif
57
+ public AndroidSdkVersions TargetApiVersion = AndroidSdkVersions.AndroidApiLevelAuto;
58
+ public bool ArmV7 = true;
59
+ public bool ArmV64 = true;
60
+
61
+
62
+ [Header("渠道包名信息")] public AppChannel Channel = AppChannel.Test;
63
+ public PublishProcess PublishProcess = PublishProcess.Apk;
64
+ public string PackageName = "com.rgame.app";
65
+ public string VersionString = "1.0.0";
66
+ public VersionType VersionType = VersionType.Release;
67
+
68
+
69
+ [Header("签名")] public bool EnableSignature = false;
70
+ public string KeystoreName;
71
+ public string KeystorePassword;
72
+ public string KeyAliasName;
73
+ public string KeyAliasPassword;
74
+
75
+ [Header("Webgl")] public bool OverrideWebglTemplate = false;
76
+ public WebGlTemplate WebglTemplate = WebGlTemplate.Minimal;
77
+ public bool OverrideWebglCompressionFormat = false;
78
+ public WebGLCompressionFormat CompressionFormat = WebGLCompressionFormat.Gzip;
79
+
80
+ [FormerlySerializedAs("EnableAASupport")] [FormerlySerializedAs("EnableAddressableSupport")] [Header("AA相关")]
81
+ /*AA相关*/
82
+ public bool AASupportEnable = false;
83
+
84
+ [FormerlySerializedAs("AddressableUseProfile")]
85
+ public string AAUseProfile = "";
86
+
87
+ public List<AddressableVariableModify> AAVariableModify = new List<AddressableVariableModify>();
88
+
89
+
90
+ //使用配置
91
+ public virtual void Apply()
92
+ {
93
+ ApplyTool.Apply(this);
94
+ }
95
+
96
+
97
+ //发布
98
+ public virtual void Publish()
99
+ {
100
+ PublishTool.Publish(this);
101
+ }
102
+
103
+ /// <summary>
104
+ /// 是否支持AA
105
+ /// </summary>
106
+ public bool IsAACanBeSetting()
107
+ {
108
+ return UniEditor.HasAddressableSupport() & AASupportEnable;
109
+ }
110
+ }
111
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 0e8c7da6e6e27cc4d9a1f888e2c52448
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: