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.
- package/Editor/AddressableSupport.cs +269 -0
- package/Editor/AddressableSupport.cs.meta +11 -0
- package/Editor/ApplyTool.cs +315 -0
- package/Editor/ApplyTool.cs.meta +11 -0
- package/Editor/EditorIcons.cs +113 -0
- package/Editor/EditorIcons.cs.meta +11 -0
- package/Editor/ExportModule.cs +218 -0
- package/Editor/ExportModule.cs.meta +11 -0
- package/Editor/InstallModule.cs +38 -0
- package/Editor/InstallModule.cs.meta +11 -0
- package/Editor/Interactive/SDKInteractiveUI.prefab +3026 -0
- package/Editor/Interactive/SDKInteractiveUI.prefab.meta +7 -0
- package/Editor/Interactive/sdk_banner.png +0 -0
- package/Editor/Interactive/sdk_banner.png.meta +144 -0
- package/Editor/Interactive/sdk_close.png +0 -0
- package/Editor/Interactive/sdk_close.png.meta +120 -0
- package/Editor/Interactive/sdk_inters.png +0 -0
- package/Editor/Interactive/sdk_inters.png.meta +120 -0
- package/Editor/Interactive/sdk_white_4x4.png +0 -0
- package/Editor/Interactive/sdk_white_4x4.png.meta +120 -0
- package/Editor/Interactive/sdk_/345/244/261/350/264/245/350/277/224/345/233/236.png +0 -0
- package/Editor/Interactive/sdk_/345/244/261/350/264/245/350/277/224/345/233/236.png.meta +120 -0
- package/Editor/Interactive/sdk_/346/202/254/346/265/256/345/271/277/345/221/212.png +0 -0
- package/Editor/Interactive/sdk_/346/202/254/346/265/256/345/271/277/345/221/212.png.meta +120 -0
- package/Editor/Interactive/sdk_/346/210/220/345/212/237/350/277/224/345/233/236.png +0 -0
- package/Editor/Interactive/sdk_/346/210/220/345/212/237/350/277/224/345/233/236.png.meta +120 -0
- 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
- 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
- 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
- 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
- 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
- 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
- package/Editor/Interactive.meta +8 -0
- package/Editor/OnApplyProcessor.cs +22 -0
- package/Editor/OnApplyProcessor.cs.meta +11 -0
- package/Editor/OnBuildAAProcessor.cs +12 -0
- package/Editor/OnBuildAAProcessor.cs.meta +11 -0
- package/Editor/OnPublicProcessor.cs +12 -0
- package/Editor/OnPublicProcessor.cs.meta +11 -0
- package/Editor/OriginalStyles.cs +708 -0
- package/Editor/OriginalStyles.cs.meta +11 -0
- package/Editor/Preferences.cs +43 -0
- package/Editor/Preferences.cs.meta +11 -0
- package/Editor/PreferencesWindow.cs +178 -0
- package/Editor/PreferencesWindow.cs.meta +11 -0
- package/Editor/PropertyInspectorEditor.cs +6 -0
- package/Editor/PropertyInspectorEditor.cs.meta +11 -0
- package/Editor/PublishProcess.cs +13 -0
- package/Editor/PublishProcess.cs.meta +11 -0
- package/Editor/PublishResult.cs +17 -0
- package/Editor/PublishResult.cs.meta +11 -0
- package/Editor/PublishSetting.cs +111 -0
- package/Editor/PublishSetting.cs.meta +11 -0
- package/Editor/PublishSettingGUIDrawer.cs +412 -0
- package/Editor/PublishSettingGUIDrawer.cs.meta +11 -0
- package/Editor/PublishSettingInspector.cs +29 -0
- package/Editor/PublishSettingInspector.cs.meta +11 -0
- package/Editor/PublishTool.cs +137 -0
- package/Editor/PublishTool.cs.meta +11 -0
- package/Editor/PublishVivoBatSetting.cs +62 -0
- package/Editor/PublishVivoBatSetting.cs.meta +11 -0
- package/Editor/PublishVivoBatSettingInspector.cs +371 -0
- package/Editor/PublishVivoBatSettingInspector.cs.meta +11 -0
- package/Editor/PublishVivoBatSettingWindow.cs +69 -0
- package/Editor/PublishVivoBatSettingWindow.cs.meta +11 -0
- package/Editor/PublishWindow.cs +364 -0
- package/Editor/PublishWindow.cs.meta +11 -0
- package/Editor/SdkFont.otf +0 -0
- package/Editor/SdkFont.otf.meta +21 -0
- package/Editor/SdkTestInUnityEditor.cs +20 -0
- package/Editor/SdkTestInUnityEditor.cs.meta +11 -0
- package/Editor/SdkTestInUnityWindow.cs +37 -0
- package/Editor/SdkTestInUnityWindow.cs.meta +11 -0
- package/Editor/Skin.guiskin +2673 -0
- package/Editor/Skin.guiskin.meta +8 -0
- package/Editor/Skins.cs +26 -0
- package/Editor/Skins.cs.meta +11 -0
- package/Editor/StyleEditorWindow.cs +23 -0
- package/Editor/StyleEditorWindow.cs.meta +11 -0
- package/Editor/Styles.cs +52 -0
- package/Editor/Styles.cs.meta +11 -0
- package/Editor/StylesExtension.cs +25 -0
- package/Editor/StylesExtension.cs.meta +11 -0
- package/Editor/Texture/btn_active.png +0 -0
- package/Editor/Texture/btn_active.png.meta +120 -0
- package/Editor/Texture/btn_blue_active.png +0 -0
- package/Editor/Texture/btn_blue_active.png.meta +120 -0
- package/Editor/Texture/btn_blue_hover.png +0 -0
- package/Editor/Texture/btn_blue_hover.png.meta +120 -0
- package/Editor/Texture/btn_blue_normal.png +0 -0
- package/Editor/Texture/btn_blue_normal.png.meta +120 -0
- package/Editor/Texture/btn_green_active.png +0 -0
- package/Editor/Texture/btn_green_active.png.meta +120 -0
- package/Editor/Texture/btn_green_hover.png +0 -0
- package/Editor/Texture/btn_green_hover.png.meta +120 -0
- package/Editor/Texture/btn_green_normal.png +0 -0
- package/Editor/Texture/btn_green_normal.png.meta +120 -0
- package/Editor/Texture/btn_hover.png +0 -0
- package/Editor/Texture/btn_hover.png.meta +120 -0
- package/Editor/Texture/btn_normal.png +0 -0
- package/Editor/Texture/btn_normal.png.meta +120 -0
- package/Editor/Texture/btn_yellow_active.png +0 -0
- package/Editor/Texture/btn_yellow_active.png.meta +120 -0
- package/Editor/Texture/btn_yellow_hover.png +0 -0
- package/Editor/Texture/btn_yellow_hover.png.meta +120 -0
- package/Editor/Texture/btn_yellow_normal.png +0 -0
- package/Editor/Texture/btn_yellow_normal.png.meta +120 -0
- package/Editor/Texture/icon_android.png +0 -0
- package/Editor/Texture/icon_android.png.meta +120 -0
- package/Editor/Texture/icon_douyin.png +0 -0
- package/Editor/Texture/icon_douyin.png.meta +120 -0
- package/Editor/Texture/icon_download.png +0 -0
- package/Editor/Texture/icon_download.png.meta +120 -0
- package/Editor/Texture/icon_error.png +0 -0
- package/Editor/Texture/icon_error.png.meta +144 -0
- package/Editor/Texture/icon_extension.png +0 -0
- package/Editor/Texture/icon_extension.png.meta +120 -0
- package/Editor/Texture/icon_googleplay.png +0 -0
- package/Editor/Texture/icon_googleplay.png.meta +120 -0
- package/Editor/Texture/icon_html5.png +0 -0
- package/Editor/Texture/icon_html5.png.meta +120 -0
- package/Editor/Texture/icon_import.png +0 -0
- package/Editor/Texture/icon_import.png.meta +144 -0
- package/Editor/Texture/icon_ios.png +0 -0
- package/Editor/Texture/icon_ios.png.meta +120 -0
- package/Editor/Texture/icon_oppo.png +0 -0
- package/Editor/Texture/icon_oppo.png.meta +120 -0
- package/Editor/Texture/icon_refresh.png +0 -0
- package/Editor/Texture/icon_refresh.png.meta +120 -0
- package/Editor/Texture/icon_save.png +0 -0
- package/Editor/Texture/icon_save.png.meta +120 -0
- package/Editor/Texture/icon_success.png +0 -0
- package/Editor/Texture/icon_success.png.meta +144 -0
- package/Editor/Texture/icon_vivo.png +0 -0
- package/Editor/Texture/icon_vivo.png.meta +120 -0
- package/Editor/Texture/icon_wechat.png +0 -0
- package/Editor/Texture/icon_wechat.png.meta +120 -0
- package/Editor/Texture/tex_select.png +0 -0
- package/Editor/Texture/tex_select.png.meta +120 -0
- package/Editor/Texture.meta +8 -0
- package/Editor/UniEditor.cs +451 -0
- package/Editor/UniEditor.cs.meta +11 -0
- package/Editor/com.typhoon.unitysdk.editor.asmdef +20 -0
- package/Editor/com.typhoon.unitysdk.editor.asmdef.meta +7 -0
- package/Editor.meta +8 -0
- package/Runtime/AndroidInstance.cs +125 -0
- package/Runtime/AndroidInstance.cs.meta +11 -0
- package/Runtime/AppChannel.cs +55 -0
- package/Runtime/AppChannel.cs.meta +11 -0
- package/Runtime/AppConfig.cs +28 -0
- package/Runtime/AppConfig.cs.meta +11 -0
- package/Runtime/AppConfigAsset.cs +50 -0
- package/Runtime/AppConfigAsset.cs.meta +11 -0
- package/Runtime/BannerPosition.cs +11 -0
- package/Runtime/BannerPosition.cs.meta +11 -0
- package/Runtime/BaseSdk.cs +78 -0
- package/Runtime/BaseSdk.cs.meta +11 -0
- package/Runtime/Extension.cs +58 -0
- package/Runtime/Extension.cs.meta +11 -0
- package/Runtime/Interface.cs +115 -0
- package/Runtime/Interface.cs.meta +11 -0
- package/Runtime/MonoSingleton.cs +76 -0
- package/Runtime/MonoSingleton.cs.meta +11 -0
- package/Runtime/Resources/TYPHOON_SDK_TEST.prefab +45 -0
- package/Runtime/Resources/TYPHOON_SDK_TEST.prefab.meta +7 -0
- package/Runtime/Resources.meta +8 -0
- package/Runtime/SDKInteractiveUI.cs +353 -0
- package/Runtime/SDKInteractiveUI.cs.meta +11 -0
- package/Runtime/SdkDebug.cs +23 -0
- package/Runtime/SdkDebug.cs.meta +11 -0
- package/Runtime/SdkTestInUnity.cs +45 -0
- package/Runtime/SdkTestInUnity.cs.meta +11 -0
- package/Runtime/SessionItem.cs +72 -0
- package/Runtime/SessionItem.cs.meta +11 -0
- package/Runtime/SimpleMap.cs +11 -0
- package/Runtime/SimpleMap.cs.meta +11 -0
- package/Runtime/TestSdk.cs +22 -0
- package/Runtime/TestSdk.cs.meta +11 -0
- package/Runtime/TyphoonSdk.cs +407 -0
- package/Runtime/TyphoonSdk.cs.meta +11 -0
- package/Runtime/TyphoonSdkCallback.cs +48 -0
- package/Runtime/TyphoonSdkCallback.cs.meta +11 -0
- package/Runtime/VersionType.cs +33 -0
- package/Runtime/VersionType.cs.meta +11 -0
- package/Runtime/com.typhoon.unitysdk.asmdef +3 -0
- package/Runtime/com.typhoon.unitysdk.asmdef.meta +7 -0
- package/Runtime.meta +8 -0
- package/Sources~/ChinaAndroid/Assets/Plugins/Android/AndroidManifest.xml +18 -0
- package/Sources~/ChinaAndroid/Assets/Plugins/Android/AndroidManifest.xml.meta +7 -0
- package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/sdk_plug-release.aar +0 -0
- package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/sdk_plug-release.aar.meta +32 -0
- package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/unity_app-release.aar +0 -0
- package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/unity_app-release.aar.meta +32 -0
- package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/unity_launcher-release.aar +0 -0
- package/Sources~/ChinaAndroid/Assets/Plugins/Android/libs/unity_launcher-release.aar.meta +32 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/ChinaAndroidSdk.cs +154 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/ChinaAndroidSdk.cs.meta +11 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor/PublishChinaAndroidAAR.cs +56 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor/PublishChinaAndroidAAR.cs.meta +11 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor.meta +8 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources/TYPHOON_SDK_CHINA_ANDROID.prefab +45 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources/TYPHOON_SDK_CHINA_ANDROID.prefab.meta +7 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources.meta +8 -0
- package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid.meta +8 -0
- package/Sources~/Package//345/270/270/347/224/250/346/211/223/345/214/205/351/205/215/347/275/256.unitypackage +0 -0
- package/package.json +1 -0
- package/package.json.meta +7 -0
package/Sources~/ChinaAndroid/Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/ChinaAndroidSdk.cs
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
|
|
3
|
+
namespace TyphoonUnitySDK
|
|
4
|
+
{
|
|
5
|
+
/// <summary>
|
|
6
|
+
/// 国内安卓
|
|
7
|
+
/// </summary>
|
|
8
|
+
public class ChinaAndroidSdk : BaseSdk
|
|
9
|
+
{
|
|
10
|
+
public TyphoonSdkCallback CallbackInstance;
|
|
11
|
+
public AndroidInstance AndroidInstance;
|
|
12
|
+
//初始化
|
|
13
|
+
public override void OnCreate()
|
|
14
|
+
{
|
|
15
|
+
Log("on create china android sdk ...");
|
|
16
|
+
DontDestroyOnLoad(gameObject);
|
|
17
|
+
//创建回调
|
|
18
|
+
CallbackInstance = TyphoonSdkCallback.CreateInstance();
|
|
19
|
+
CallbackInstance.gameObject.name = "TYPHOON_SDK_CALL_BACK";
|
|
20
|
+
CallbackInstance.Initialize();
|
|
21
|
+
DontDestroyOnLoad(CallbackInstance.gameObject);
|
|
22
|
+
//创建android实例
|
|
23
|
+
AndroidInstance = AndroidInstance.CreateInstance();
|
|
24
|
+
AndroidInstance.gameObject.name = "TYPHOON_SDK_ANDROID_INSTANCE";
|
|
25
|
+
AndroidInstance.Initialize();
|
|
26
|
+
DontDestroyOnLoad(AndroidInstance.gameObject);
|
|
27
|
+
Log("on create china android sdk success");
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#region 初始化SDK
|
|
31
|
+
|
|
32
|
+
public override void InitSdk(Action success, Action<string> fail)
|
|
33
|
+
{
|
|
34
|
+
AndroidInstance.CallWithSession(new SessionItem("initSdk", null, (res) =>
|
|
35
|
+
{
|
|
36
|
+
if (res == "ok")
|
|
37
|
+
{
|
|
38
|
+
success?.Invoke();
|
|
39
|
+
}
|
|
40
|
+
else
|
|
41
|
+
{
|
|
42
|
+
fail?.Invoke(res);
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
#endregion
|
|
48
|
+
|
|
49
|
+
#region 登录
|
|
50
|
+
|
|
51
|
+
public override void Login(Action success, Action<string> fail)
|
|
52
|
+
{
|
|
53
|
+
AndroidInstance.CallWithSession(new SessionItem("login", null, (res) =>
|
|
54
|
+
{
|
|
55
|
+
if (res == "ok")
|
|
56
|
+
{
|
|
57
|
+
success?.Invoke();
|
|
58
|
+
}
|
|
59
|
+
else
|
|
60
|
+
{
|
|
61
|
+
fail?.Invoke(res);
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#endregion
|
|
67
|
+
|
|
68
|
+
#region 退出游戏
|
|
69
|
+
|
|
70
|
+
public override bool IsSupportExitGame()
|
|
71
|
+
{
|
|
72
|
+
return AndroidInstance.CallReturn<bool>("isSupportExitGame");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public override void ExitGame()
|
|
76
|
+
{
|
|
77
|
+
AndroidInstance.Call("exitGame");
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#endregion
|
|
81
|
+
|
|
82
|
+
#region Banner
|
|
83
|
+
|
|
84
|
+
public override void ShowBanner(string scene, BannerPosition position)
|
|
85
|
+
{
|
|
86
|
+
AndroidInstance.Call("showBanner", scene, ((int)position));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
public override void HideBanner(string scene)
|
|
90
|
+
{
|
|
91
|
+
AndroidInstance.Call("hideBanner", scene);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
#endregion
|
|
95
|
+
|
|
96
|
+
#region 视频广告
|
|
97
|
+
|
|
98
|
+
public override void ShowVideo(string scene, Action success, Action<string> fail)
|
|
99
|
+
{
|
|
100
|
+
AndroidInstance.CallWithSession(new SessionItem("showVideo", new { scene = scene }, (res) =>
|
|
101
|
+
{
|
|
102
|
+
if (res == "ok")
|
|
103
|
+
{
|
|
104
|
+
Log($"show video success scene:{scene}");
|
|
105
|
+
success?.Invoke();
|
|
106
|
+
}
|
|
107
|
+
else
|
|
108
|
+
{
|
|
109
|
+
Log($"show video fail {res} scene:{scene}");
|
|
110
|
+
fail?.Invoke(res);
|
|
111
|
+
}
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
#endregion
|
|
116
|
+
|
|
117
|
+
#region 插页广告
|
|
118
|
+
|
|
119
|
+
public override void ShowInters(string scene)
|
|
120
|
+
{
|
|
121
|
+
AndroidInstance.Call("showInters", scene);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
#endregion
|
|
125
|
+
|
|
126
|
+
#region 悬浮ICON
|
|
127
|
+
|
|
128
|
+
public override void ShowFloatIcon(string scene, float screenXP, float screenYP)
|
|
129
|
+
{
|
|
130
|
+
AndroidInstance.Call("showFloatIcon", scene, screenXP, screenYP);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
public override void HideFloatIcon(string scene)
|
|
134
|
+
{
|
|
135
|
+
AndroidInstance.Call("hideFloatIcon", scene);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
#endregion
|
|
139
|
+
|
|
140
|
+
#region 原生模板
|
|
141
|
+
|
|
142
|
+
public override void ShowNative(string scene)
|
|
143
|
+
{
|
|
144
|
+
AndroidInstance.Call("showNative", scene);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
public override void HideNative(string scene)
|
|
148
|
+
{
|
|
149
|
+
AndroidInstance.Call("hideNative", scene);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
#endregion
|
|
153
|
+
}
|
|
154
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.IO;
|
|
3
|
+
using UnityEditor;
|
|
4
|
+
using UnityEditor.Android;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace TyphoonUnitySDK
|
|
8
|
+
{
|
|
9
|
+
/// <summary>
|
|
10
|
+
/// 发布流程-ChinaAndroidAAR
|
|
11
|
+
/// </summary>
|
|
12
|
+
public class PublishChinaAndroidAAR : IPublish
|
|
13
|
+
{
|
|
14
|
+
public PublishResult Publish(PublishSetting setting)
|
|
15
|
+
{
|
|
16
|
+
PublishResult result = new PublishResult();
|
|
17
|
+
//切换到工程模式
|
|
18
|
+
PublishTool.SwitchToProject();
|
|
19
|
+
|
|
20
|
+
if (!UniEditor.GradleIsMatch())
|
|
21
|
+
{
|
|
22
|
+
UniEditor.ShowMessageBox($"未配置gradle,去配置?", PreferencesWindow.Open);
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var path = $".typhoonoutput/china_android_{DateTime.Now.ToString("yyyyMMddHHmmss")}";
|
|
27
|
+
if (!UniEditor.IsAsciiPath(path))
|
|
28
|
+
{
|
|
29
|
+
UniEditor.ShowMessageBox($"路径不符合要求,不支持中文路径:\n当前:{path}", null);
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
UniEditor.TryDeleteFolder("Assets/Plugins/Android");
|
|
35
|
+
AssetDatabase.Refresh();
|
|
36
|
+
|
|
37
|
+
PublishTool.InvokeOnPublishStart(setting);
|
|
38
|
+
//导出前执行
|
|
39
|
+
BuildPipeline.BuildPlayer(EditorBuildSettings.scenes, path, BuildTarget.Android, BuildOptions.None);
|
|
40
|
+
if (!Directory.Exists(path))
|
|
41
|
+
{
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
Debug.Log($"发布完成 {path}");
|
|
46
|
+
EditorUtility.RevealInFinder(path);
|
|
47
|
+
//生成发布bat
|
|
48
|
+
var gradle = AndroidExternalToolsSettings.gradlePath;
|
|
49
|
+
var publish_bat = $"{path}/publish.bat";
|
|
50
|
+
File.WriteAllText(publish_bat, $"{gradle} assembleRelease --max-workers=8");
|
|
51
|
+
result.AndroidProj = path;
|
|
52
|
+
PublishTool.InvokeOnPublishEnd(setting, result);
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
%YAML 1.1
|
|
2
|
+
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
+
--- !u!1 &9093766737953046255
|
|
4
|
+
GameObject:
|
|
5
|
+
m_ObjectHideFlags: 0
|
|
6
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
7
|
+
m_PrefabInstance: {fileID: 0}
|
|
8
|
+
m_PrefabAsset: {fileID: 0}
|
|
9
|
+
serializedVersion: 6
|
|
10
|
+
m_Component:
|
|
11
|
+
- component: {fileID: 2274013749723012757}
|
|
12
|
+
- component: {fileID: 7218307239069338908}
|
|
13
|
+
m_Layer: 0
|
|
14
|
+
m_Name: TYPHOON_SDK_CHINA_ANDROID
|
|
15
|
+
m_TagString: Untagged
|
|
16
|
+
m_Icon: {fileID: 0}
|
|
17
|
+
m_NavMeshLayer: 0
|
|
18
|
+
m_StaticEditorFlags: 0
|
|
19
|
+
m_IsActive: 1
|
|
20
|
+
--- !u!4 &2274013749723012757
|
|
21
|
+
Transform:
|
|
22
|
+
m_ObjectHideFlags: 0
|
|
23
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
24
|
+
m_PrefabInstance: {fileID: 0}
|
|
25
|
+
m_PrefabAsset: {fileID: 0}
|
|
26
|
+
m_GameObject: {fileID: 9093766737953046255}
|
|
27
|
+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
|
28
|
+
m_LocalPosition: {x: 0, y: 0, z: 0}
|
|
29
|
+
m_LocalScale: {x: 1, y: 1, z: 1}
|
|
30
|
+
m_Children: []
|
|
31
|
+
m_Father: {fileID: 0}
|
|
32
|
+
m_RootOrder: 0
|
|
33
|
+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
|
34
|
+
--- !u!114 &7218307239069338908
|
|
35
|
+
MonoBehaviour:
|
|
36
|
+
m_ObjectHideFlags: 0
|
|
37
|
+
m_CorrespondingSourceObject: {fileID: 0}
|
|
38
|
+
m_PrefabInstance: {fileID: 0}
|
|
39
|
+
m_PrefabAsset: {fileID: 0}
|
|
40
|
+
m_GameObject: {fileID: 9093766737953046255}
|
|
41
|
+
m_Enabled: 1
|
|
42
|
+
m_EditorHideFlags: 0
|
|
43
|
+
m_Script: {fileID: 11500000, guid: 740e1dabb1ce501408c63b39e066a580, type: 3}
|
|
44
|
+
m_Name:
|
|
45
|
+
m_EditorClassIdentifier:
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.2","description":"unity端个汇总渠道的sdk,统一接口,一键发布","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"}],"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}
|