com.typhoon.unitysdk 1.0.20 → 1.0.21
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/ApplyTool.cs +28 -0
- package/Editor/DouyinConfig.cs +132 -0
- package/Editor/{WxMiniConfigWindow.cs.meta → DouyinConfig.cs.meta} +1 -1
- package/Editor/ExportModule.cs +21 -0
- package/Editor/GUIDrawer.cs +31 -0
- package/Editor/PublishProcess.cs +1 -0
- package/Editor/PublishResult.cs +5 -0
- package/Editor/PublishSetting.cs +3 -0
- package/Editor/PublishSettingGUIDrawer.cs +19 -0
- package/Editor/PublishTool.cs +3 -1
- package/Editor/PublishVivoBatSettingInspector.cs +1 -1
- package/Editor/PublishWindow.cs +2 -1
- package/Editor/UniEditor.cs +6 -0
- package/Runtime/AppConfig.cs +16 -0
- package/Runtime/AppConfigAsset.cs +5 -2
- package/Runtime/TyphoonSdk.cs +29 -0
- package/Runtime/UnityToJs.cs +2 -0
- package/Sources~/Package/Douyin.unitypackage +0 -0
- package/Sources~/Package/Douyin.unitypackage.manifest +107 -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 -1
- package/Editor/WxMiniConfigWindow.cs +0 -58
package/Editor/ApplyTool.cs
CHANGED
|
@@ -25,6 +25,7 @@ namespace TyphoonUnitySDK
|
|
|
25
25
|
{ AppChannel.ChinaAndroid, new ApplyChinaAndroid() },
|
|
26
26
|
{ AppChannel.Test, new ApplyTest() },
|
|
27
27
|
{ AppChannel.WxMini, new ApplyWxMini() },
|
|
28
|
+
{ AppChannel.DouyinAndroid, new ApplyDouyinAndroid() },
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
|
|
@@ -73,6 +74,7 @@ namespace TyphoonUnitySDK
|
|
|
73
74
|
Debug.LogError($"未处理Apply:{setting.Channel}");
|
|
74
75
|
return;
|
|
75
76
|
}
|
|
77
|
+
|
|
76
78
|
match.Apply(setting);
|
|
77
79
|
InvokeOnApplyEnd(setting);
|
|
78
80
|
}
|
|
@@ -248,6 +250,12 @@ namespace TyphoonUnitySDK
|
|
|
248
250
|
AppConfigAsset.Instance.Version = setting.VersionString;
|
|
249
251
|
AppConfigAsset.Instance.VersionType = setting.VersionType;
|
|
250
252
|
AppConfigAsset.Instance.PublishTime = DateTime.Now.ToString("yyyyMMddHHmmss");
|
|
253
|
+
|
|
254
|
+
//写入抖音小游戏参数
|
|
255
|
+
AppConfigAsset.Instance.DouyinVideoId = DouyinConfig.Default.VideoId;
|
|
256
|
+
AppConfigAsset.Instance.DouyinIntersId = DouyinConfig.Default.IntersId;
|
|
257
|
+
AppConfigAsset.Instance.DouyinBannerId = DouyinConfig.Default.BannerId;
|
|
258
|
+
|
|
251
259
|
EditorUtility.SetDirty(AppConfigAsset.Instance);
|
|
252
260
|
AssetDatabase.SaveAssets();
|
|
253
261
|
}
|
|
@@ -423,5 +431,25 @@ namespace TyphoonUnitySDK
|
|
|
423
431
|
AssetDatabase.Refresh();
|
|
424
432
|
}
|
|
425
433
|
}
|
|
434
|
+
|
|
435
|
+
/*抖音android*/
|
|
436
|
+
public class ApplyDouyinAndroid : IApply
|
|
437
|
+
{
|
|
438
|
+
public void Apply(PublishSetting setting)
|
|
439
|
+
{
|
|
440
|
+
Debug.Log($"导入... {UniEditor.PackagePath_Douyin}");
|
|
441
|
+
ImportUnityPackage(UniEditor.PackagePath_Douyin);
|
|
442
|
+
var manifest_path = $"{UniEditor.PackagePath_Douyin}.manifest";
|
|
443
|
+
Debug.Log($"读取资源清单...{manifest_path}");
|
|
444
|
+
var manifest = ReadManifest(manifest_path);
|
|
445
|
+
Debug.Log($"清理多余文件...");
|
|
446
|
+
foreach (var folder in MaybeFolder)
|
|
447
|
+
{
|
|
448
|
+
ClearFilesInDirectory(folder, manifest);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
AssetDatabase.Refresh();
|
|
452
|
+
}
|
|
453
|
+
}
|
|
426
454
|
}
|
|
427
455
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.IO;
|
|
4
|
+
using UnityEditor;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
using UnityEngine.Serialization;
|
|
7
|
+
|
|
8
|
+
namespace TyphoonUnitySDK
|
|
9
|
+
{
|
|
10
|
+
/*抖音小游戏配置GUI绘制*/
|
|
11
|
+
public static class DouyinConfigGUIDrawer
|
|
12
|
+
{
|
|
13
|
+
public static Dictionary<string, Func<DouyinConfig, bool>> OverrideDrawGUIFunc =
|
|
14
|
+
new Dictionary<string, Func<DouyinConfig, bool>>()
|
|
15
|
+
{
|
|
16
|
+
{ "m_Script", DrawProperty_m_Script },
|
|
17
|
+
{ nameof(DouyinConfig.AppId), DrawProperty_AppId },
|
|
18
|
+
{ nameof(DouyinConfig.VideoId), DrawProperty_VideoId },
|
|
19
|
+
{ nameof(DouyinConfig.IntersId), DrawProperty_IntersId },
|
|
20
|
+
{ nameof(DouyinConfig.ApkName), DrawProperty_ApkName },
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
private static bool DrawProperty_ApkName(DouyinConfig arg)
|
|
25
|
+
{
|
|
26
|
+
arg.ApkName = EditorGUILayout.TextField("apk文件名", arg.ApkName);
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
private static bool DrawProperty_IntersId(DouyinConfig arg)
|
|
32
|
+
{
|
|
33
|
+
arg.IntersId = EditorGUILayout.TextField("插页广告ID", arg.IntersId);
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private static bool DrawProperty_VideoId(DouyinConfig arg)
|
|
38
|
+
{
|
|
39
|
+
arg.VideoId = EditorGUILayout.TextField("视频广告ID", arg.VideoId);
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private static bool DrawProperty_AppId(DouyinConfig arg)
|
|
44
|
+
{
|
|
45
|
+
arg.AppId = EditorGUILayout.TextField("AppId", arg.AppId);
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
private static bool DrawProperty_m_Script(DouyinConfig arg)
|
|
51
|
+
{
|
|
52
|
+
var tmpEnable = GUI.enabled;
|
|
53
|
+
GUI.enabled = true;
|
|
54
|
+
GUILayout.Space(6);
|
|
55
|
+
GUIDrawer.DrawKeynotes("①仅支持Unity版本:2019.4.35,2021.3.14(最优,支持ASTC压缩,可减少Webgl运行消耗)");
|
|
56
|
+
GUIDrawer.DrawKeynotes(" 详细以官方文档地址为准,链接如下:");
|
|
57
|
+
var url = "https://bytedance.feishu.cn/docx/doxcnTTjZHp8J6HzdrSbWu1aK5b";
|
|
58
|
+
GUIDrawer.DrawUrlLink($" {url}", () => Application.OpenURL(url));
|
|
59
|
+
GUIDrawer.DrawKeynotes("②需要接入录屏分享功能");
|
|
60
|
+
GUIDrawer.DrawKeynotes("③使用指定广告图标,链接如下:");
|
|
61
|
+
url = "https://developer.open-douyin.com/docs/resource/zh-CN/mini-game/operation1/advertise/norms";
|
|
62
|
+
GUIDrawer.DrawUrlLink($" {url}", () => Application.OpenURL(url));
|
|
63
|
+
GUILayout.Space(6);
|
|
64
|
+
GUI.enabled = tmpEnable;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/*绘制GUI*/
|
|
70
|
+
public static void DrawGUI()
|
|
71
|
+
{
|
|
72
|
+
var config = DouyinConfig.Default;
|
|
73
|
+
GUIDrawer.DrawProperty(config, (property) =>
|
|
74
|
+
{
|
|
75
|
+
if (OverrideDrawGUIFunc.TryGetValue(property, out var match))
|
|
76
|
+
{
|
|
77
|
+
return match.Invoke(config);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return false;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/// <summary>
|
|
86
|
+
/// 抖音小游戏配置
|
|
87
|
+
/// </summary>
|
|
88
|
+
public class DouyinConfig : ScriptableObject
|
|
89
|
+
{
|
|
90
|
+
private static string ConfigPath = "Assets/Typhoon_Gen/TyphoonSDK/Editor/DouyinConfig.asset";
|
|
91
|
+
|
|
92
|
+
private static DouyinConfig _instance = null;
|
|
93
|
+
|
|
94
|
+
public static DouyinConfig Default
|
|
95
|
+
{
|
|
96
|
+
get
|
|
97
|
+
{
|
|
98
|
+
if (_instance == null)
|
|
99
|
+
{
|
|
100
|
+
_instance = AssetDatabase.LoadAssetAtPath<DouyinConfig>(ConfigPath);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (_instance == null)
|
|
104
|
+
{
|
|
105
|
+
_instance = CreateInstance<DouyinConfig>();
|
|
106
|
+
var folder = Path.GetDirectoryName(ConfigPath);
|
|
107
|
+
if (!Directory.Exists(folder))
|
|
108
|
+
{
|
|
109
|
+
Directory.CreateDirectory(folder);
|
|
110
|
+
AssetDatabase.Refresh();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
AssetDatabase.CreateAsset(_instance, ConfigPath);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
return _instance;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
public string AppId;
|
|
121
|
+
public string IntersId;
|
|
122
|
+
public string VideoId;
|
|
123
|
+
public string BannerId;
|
|
124
|
+
public string ApkName;
|
|
125
|
+
|
|
126
|
+
public void Save()
|
|
127
|
+
{
|
|
128
|
+
EditorUtility.SetDirty(this);
|
|
129
|
+
AssetDatabase.SaveAssets();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
package/Editor/ExportModule.cs
CHANGED
|
@@ -61,6 +61,27 @@ namespace TyphoonUnitySDK
|
|
|
61
61
|
ExportUnityPackage(manifest, UniEditor.PackagePath_WxMini, out var detail);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
[MenuItem("TyphoonSDK/开发者/导出-Douyin.unitypackage")]
|
|
65
|
+
public static void ExportDouyin()
|
|
66
|
+
{
|
|
67
|
+
var manifest = new List<string>()
|
|
68
|
+
{
|
|
69
|
+
"Assets/Plugins/ByteGame",
|
|
70
|
+
"Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin",
|
|
71
|
+
};
|
|
72
|
+
if (!MakeSureExport(manifest))
|
|
73
|
+
{
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!CheckMissFiles(manifest))
|
|
78
|
+
{
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
ExportUnityPackage(manifest, UniEditor.PackagePath_Douyin, out var detail);
|
|
83
|
+
}
|
|
84
|
+
|
|
64
85
|
/// <summary>
|
|
65
86
|
/// 导出清单文件到模块
|
|
66
87
|
/// </summary>
|
package/Editor/GUIDrawer.cs
CHANGED
|
@@ -29,6 +29,23 @@ namespace TyphoonUnitySDK
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
private static GUIStyle _linkstyle = null;
|
|
33
|
+
|
|
34
|
+
private static GUIStyle LinkStyle
|
|
35
|
+
{
|
|
36
|
+
get
|
|
37
|
+
{
|
|
38
|
+
if (_linkstyle == null)
|
|
39
|
+
{
|
|
40
|
+
_linkstyle = new GUIStyle(Styles.rlabel_italic);
|
|
41
|
+
_linkstyle.normal.textColor = new Color(0.02f, 0.49f, 0.84f, 1f);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return _linkstyle;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
32
49
|
/// <summary>
|
|
33
50
|
/// 绘制GUI属性
|
|
34
51
|
/// </summary>
|
|
@@ -76,7 +93,21 @@ namespace TyphoonUnitySDK
|
|
|
76
93
|
/// </summary>
|
|
77
94
|
public static void DrawKeynotes(string content, params GUILayoutOption[] option)
|
|
78
95
|
{
|
|
96
|
+
StyleTooltip.normal.textColor = EditorGUIUtility.isProSkin
|
|
97
|
+
? new Color(0.47f, 0.8f, 1f, 1f)
|
|
98
|
+
: new Color(0.04f, 0.31f, 0.57f, 1f);
|
|
79
99
|
GUILayout.TextArea(content, StyleTooltip, option);
|
|
80
100
|
}
|
|
101
|
+
|
|
102
|
+
/// <summary>
|
|
103
|
+
/// 绘制关键提示
|
|
104
|
+
/// </summary>
|
|
105
|
+
public static void DrawUrlLink(string content, Action handler, params GUILayoutOption[] option)
|
|
106
|
+
{
|
|
107
|
+
if (GUILayout.Button(new GUIContent(content, "跳转..."), LinkStyle, option))
|
|
108
|
+
{
|
|
109
|
+
handler?.Invoke();
|
|
110
|
+
}
|
|
111
|
+
}
|
|
81
112
|
}
|
|
82
113
|
}
|
package/Editor/PublishProcess.cs
CHANGED
package/Editor/PublishResult.cs
CHANGED
package/Editor/PublishSetting.cs
CHANGED
|
@@ -48,8 +48,27 @@ namespace TyphoonUnitySDK
|
|
|
48
48
|
{ nameof(PublishSetting.PresetModifyEnable), DrawProperty_PresetModifyEnable },
|
|
49
49
|
{ nameof(PublishSetting.PresetModify), DrawProperty_PresetModify },
|
|
50
50
|
{ nameof(PublishSetting.WxMiniGUIFoldout), DrawProperty_WxMiniGUIFoldout },
|
|
51
|
+
{ nameof(PublishSetting.DouyinGUIFoldout), DrawProperty_DouyinGUIFoldout },
|
|
51
52
|
};
|
|
52
53
|
|
|
54
|
+
/*绘制抖音小游戏GUI*/
|
|
55
|
+
private static bool DrawProperty_DouyinGUIFoldout(PublishSetting arg)
|
|
56
|
+
{
|
|
57
|
+
if (arg.Channel != AppChannel.DouyinAndroid && arg.Channel != AppChannel.DouyinIOS)
|
|
58
|
+
{
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
GUILayout.Space(10);
|
|
63
|
+
arg.DouyinGUIFoldout = GUIDrawer.DrawFoldout("抖音小游戏", arg.DouyinGUIFoldout, GUILayout.Height(26));
|
|
64
|
+
if (arg.DouyinGUIFoldout)
|
|
65
|
+
{
|
|
66
|
+
DouyinConfigGUIDrawer.DrawGUI();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
53
72
|
/*绘制微信GUI*/
|
|
54
73
|
private static bool DrawProperty_WxMiniGUIFoldout(PublishSetting arg)
|
|
55
74
|
{
|
package/Editor/PublishTool.cs
CHANGED
|
@@ -22,7 +22,9 @@ namespace TyphoonUnitySDK
|
|
|
22
22
|
public static Dictionary<PublishProcess, string> PublicClasses = new Dictionary<PublishProcess, string>()
|
|
23
23
|
{
|
|
24
24
|
{ PublishProcess.ChinaAndroidAAR, "TyphoonUnitySDK.PublishChinaAndroidAAR" },
|
|
25
|
-
{ PublishProcess.WxMini, "TyphoonUnitySDK.PublishWxMini" }
|
|
25
|
+
{ PublishProcess.WxMini, "TyphoonUnitySDK.PublishWxMini" },
|
|
26
|
+
{ PublishProcess.DouyinAndroid, "TyphoonUnitySDK.PublishDouyinAndroid" }
|
|
27
|
+
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
/// <summary>
|
package/Editor/PublishWindow.cs
CHANGED
|
@@ -16,7 +16,7 @@ namespace TyphoonUnitySDK
|
|
|
16
16
|
// AppChannel.WxMini,
|
|
17
17
|
AppChannel.VivoMini,
|
|
18
18
|
AppChannel.OppoMini,
|
|
19
|
-
AppChannel.DouyinAndroid,
|
|
19
|
+
// AppChannel.DouyinAndroid,
|
|
20
20
|
AppChannel.DouyinIOS,
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -286,6 +286,7 @@ namespace TyphoonUnitySDK
|
|
|
286
286
|
EditorUtility.SetDirty(_select);
|
|
287
287
|
//保存其它配置
|
|
288
288
|
WxMiniConfig.Default.Save();
|
|
289
|
+
DouyinConfig.Default.Save();
|
|
289
290
|
AssetDatabase.SaveAssets();
|
|
290
291
|
}
|
|
291
292
|
|
package/Editor/UniEditor.cs
CHANGED
|
@@ -34,6 +34,12 @@ namespace TyphoonUnitySDK
|
|
|
34
34
|
public static string PackagePath_WxMini = $"{PathRoot}/Sources~/Package/WxMini.unitypackage";
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
/// <summary>
|
|
38
|
+
/// 抖音小游戏 资源包
|
|
39
|
+
/// </summary>
|
|
40
|
+
public static string PackagePath_Douyin = $"{PathRoot}/Sources~/Package/Douyin.unitypackage";
|
|
41
|
+
|
|
42
|
+
|
|
37
43
|
/// <summary>
|
|
38
44
|
/// 开启Addressable模块支持
|
|
39
45
|
/// </summary>
|
package/Runtime/AppConfig.cs
CHANGED
|
@@ -24,5 +24,21 @@ namespace TyphoonUnitySDK
|
|
|
24
24
|
/// 发布时间
|
|
25
25
|
/// </summary>
|
|
26
26
|
public static string PublishTime => AppConfigAsset.Instance.PublishTime;
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
/// <summary>
|
|
30
|
+
/// [抖音小游戏]视频广告ID
|
|
31
|
+
/// </summary>
|
|
32
|
+
public static string DouyinVideoId = AppConfigAsset.Instance.DouyinVideoId;
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
/// [抖音小游戏]插页广告ID
|
|
36
|
+
/// </summary>
|
|
37
|
+
public static string DouyinIntersId => AppConfigAsset.Instance.DouyinIntersId;
|
|
38
|
+
|
|
39
|
+
/// <summary>
|
|
40
|
+
/// [抖音小游戏]BannerID
|
|
41
|
+
/// </summary>
|
|
42
|
+
public static string DouyinBannerId => AppConfigAsset.Instance.DouyinBannerId;
|
|
27
43
|
}
|
|
28
44
|
}
|
|
@@ -44,7 +44,10 @@ namespace TyphoonUnitySDK
|
|
|
44
44
|
|
|
45
45
|
[Tooltip("版本类型")] public VersionType VersionType = VersionType.Release;
|
|
46
46
|
|
|
47
|
-
[
|
|
48
|
-
|
|
47
|
+
[Tooltip("发布时间")] public string PublishTime = "19700101000000";
|
|
48
|
+
|
|
49
|
+
[Tooltip("[抖音小游戏]视频广告ID")] public string DouyinVideoId;
|
|
50
|
+
[Tooltip("[抖音小游戏]插页广告ID")] public string DouyinIntersId;
|
|
51
|
+
[Tooltip("[抖音小游戏]Banner广告ID")] public string DouyinBannerId;
|
|
49
52
|
}
|
|
50
53
|
}
|
package/Runtime/TyphoonSdk.cs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
using System;
|
|
2
|
+
using System.Collections;
|
|
2
3
|
using System.Collections.Generic;
|
|
3
4
|
using UnityEngine;
|
|
4
5
|
|
|
@@ -15,6 +16,8 @@ namespace TyphoonUnitySDK
|
|
|
15
16
|
{ AppChannel.Test, "TYPHOON_SDK_TEST" }, //测试渠道
|
|
16
17
|
{ AppChannel.ChinaAndroid, "TYPHOON_SDK_CHINA_ANDROID" }, //国内安卓
|
|
17
18
|
{ AppChannel.WxMini, "TYPHOON_SDK_WX_MINI" }, //微信小游戏
|
|
19
|
+
{ AppChannel.DouyinAndroid, "TYPHOON_SDK_DOUYIN_MINI" }, //抖音小游戏
|
|
20
|
+
{ AppChannel.DouyinIOS, "TYPHOON_SDK_DOUYIN_MINI" }, //抖音小游戏
|
|
18
21
|
};
|
|
19
22
|
|
|
20
23
|
private ISdk _sdk;
|
|
@@ -383,5 +386,31 @@ namespace TyphoonUnitySDK
|
|
|
383
386
|
}
|
|
384
387
|
|
|
385
388
|
#endregion
|
|
389
|
+
|
|
390
|
+
#region 协程
|
|
391
|
+
|
|
392
|
+
/// <summary>
|
|
393
|
+
/// 使用协程延迟处理逻辑
|
|
394
|
+
/// </summary>
|
|
395
|
+
public Coroutine WaitTo(float delay, Action handler)
|
|
396
|
+
{
|
|
397
|
+
return StartCoroutine(IeWaitTo(delay, handler));
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
private IEnumerator IeWaitTo(float delay, Action handler)
|
|
401
|
+
{
|
|
402
|
+
yield return new WaitForSeconds(delay);
|
|
403
|
+
handler?.Invoke();
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/// <summary>
|
|
407
|
+
/// 中断协程
|
|
408
|
+
/// </summary>
|
|
409
|
+
public void KillWaitTo(Coroutine coroutine)
|
|
410
|
+
{
|
|
411
|
+
StopCoroutine(coroutine);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
#endregion
|
|
386
415
|
}
|
|
387
416
|
}
|
package/Runtime/UnityToJs.cs
CHANGED
|
Binary file
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
Assets/Plugins/ByteGame
|
|
2
|
+
Assets/Plugins/ByteGame/bgdt.txt
|
|
3
|
+
Assets/Plugins/ByteGame/bgdt.txt.meta
|
|
4
|
+
Assets/Plugins/ByteGame/com.bytedance.bgdt.meta
|
|
5
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.meta
|
|
6
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools.meta
|
|
7
|
+
Assets/Plugins/ByteGame/com.bytedance.bgdt/Editor.meta
|
|
8
|
+
Assets/Plugins/ByteGame/com.bytedance.bgdt/package.json
|
|
9
|
+
Assets/Plugins/ByteGame/com.bytedance.bgdt/package.json.meta
|
|
10
|
+
Assets/Plugins/ByteGame/com.bytedance.bgdt/Editor/bgdt.data
|
|
11
|
+
Assets/Plugins/ByteGame/com.bytedance.bgdt/Editor/bgdt.data.meta
|
|
12
|
+
Assets/Plugins/ByteGame/com.bytedance.bgdt/Editor/bgdt.dll
|
|
13
|
+
Assets/Plugins/ByteGame/com.bytedance.bgdt/Editor/bgdt.dll.meta
|
|
14
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons.meta
|
|
15
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson.meta
|
|
16
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/package.json
|
|
17
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/package.json.meta
|
|
18
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Resources.meta
|
|
19
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/starksdk.dll
|
|
20
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/starksdk.dll.meta
|
|
21
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/starksdk.xml
|
|
22
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/starksdk.xml.meta
|
|
23
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL.meta
|
|
24
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/follow_icon.png
|
|
25
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/follow_icon.png.meta
|
|
26
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/follow_icon_show.png
|
|
27
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/follow_icon_show.png.meta
|
|
28
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_about.png
|
|
29
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_about.png.meta
|
|
30
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_character.png
|
|
31
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_character.png.meta
|
|
32
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_character2.png
|
|
33
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_character2.png.meta
|
|
34
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_show.png
|
|
35
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_show.png.meta
|
|
36
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_show2.png
|
|
37
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Icons/official_icon_show2.png.meta
|
|
38
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/IJsonWrapper.cs
|
|
39
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/IJsonWrapper.cs.meta
|
|
40
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonData.cs
|
|
41
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonData.cs.meta
|
|
42
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonException.cs
|
|
43
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonException.cs.meta
|
|
44
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonMapper.cs
|
|
45
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonMapper.cs.meta
|
|
46
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonMockWrapper.cs
|
|
47
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonMockWrapper.cs.meta
|
|
48
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonReader.cs
|
|
49
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonReader.cs.meta
|
|
50
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonWriter.cs
|
|
51
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/JsonWriter.cs.meta
|
|
52
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/Lexer.cs
|
|
53
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/Lexer.cs.meta
|
|
54
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/Netstandard15Polyfill.cs
|
|
55
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/Netstandard15Polyfill.cs.meta
|
|
56
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/ParserToken.cs
|
|
57
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/ParserToken.cs.meta
|
|
58
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/StarkLitJson.asmdef
|
|
59
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/LitJson/StarkLitJson.asmdef.meta
|
|
60
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Resources/ContainerConfig.json
|
|
61
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/Resources/ContainerConfig.json.meta
|
|
62
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/FileSystem.meta
|
|
63
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkCallbackHandler.cs
|
|
64
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkCallbackHandler.cs.meta
|
|
65
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkModel.cs
|
|
66
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkModel.cs.meta
|
|
67
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkSDK.jslib
|
|
68
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkSDK.jslib.meta
|
|
69
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkStorageManager.cs
|
|
70
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkStorageManager.cs.meta
|
|
71
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkWebGL.asmdef
|
|
72
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkWebGL.asmdef.meta
|
|
73
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkWebGLInterface.cs
|
|
74
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/StarkWebGLInterface.cs.meta
|
|
75
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/UNBridge.jslib
|
|
76
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/UNBridge.jslib.meta
|
|
77
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/FileSystem/StarkFileSystemManager.cs
|
|
78
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/FileSystem/StarkFileSystemManager.cs.meta
|
|
79
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/FileSystem/StarkFileSystemManagerDefault.cs
|
|
80
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/FileSystem/StarkFileSystemManagerDefault.cs.meta
|
|
81
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/FileSystem/StarkFileSystemManagerWebGL.cs
|
|
82
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk/WebGL/FileSystem/StarkFileSystemManagerWebGL.cs.meta
|
|
83
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Editor.meta
|
|
84
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/package.json
|
|
85
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/package.json.meta
|
|
86
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools.meta
|
|
87
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Editor/starksdk_tools.dll
|
|
88
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Editor/starksdk_tools.dll.meta
|
|
89
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools/dummy.py
|
|
90
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools/dummy.py.meta
|
|
91
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools~/clean_cache.bat
|
|
92
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools~/clean_cache.sh
|
|
93
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools~/launch_game.bat
|
|
94
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools~/launch_game.sh
|
|
95
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools~/pushapk.bat
|
|
96
|
+
Assets/Plugins/ByteGame/com.bytedance.starksdk.unitytools/Tools~/pushapk.sh
|
|
97
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin
|
|
98
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/DouyinBannerAd.cs
|
|
99
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/DouyinBannerAd.cs.meta
|
|
100
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/DouyinSdk.cs
|
|
101
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/DouyinSdk.cs.meta
|
|
102
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Editor.meta
|
|
103
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Resources.meta
|
|
104
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Editor/PublishDouyinAndroid.cs
|
|
105
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Editor/PublishDouyinAndroid.cs.meta
|
|
106
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Resources/TYPHOON_SDK_DOUYIN_MINI.prefab
|
|
107
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Resources/TYPHOON_SDK_DOUYIN_MINI.prefab.meta
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.
|
|
1
|
+
{"name":"com.typhoon.unitysdk","displayName":"typhoon unity sdk","version":"1.0.21","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"}}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
using UnityEditor;
|
|
2
|
-
using UnityEngine;
|
|
3
|
-
|
|
4
|
-
namespace TyphoonUnitySDK
|
|
5
|
-
{
|
|
6
|
-
/// <summary>
|
|
7
|
-
/// 微信小游戏配置窗口
|
|
8
|
-
/// </summary>
|
|
9
|
-
public class WxMiniConfigWindow : EditorWindow
|
|
10
|
-
{
|
|
11
|
-
private Vector2 _scroll;
|
|
12
|
-
|
|
13
|
-
public static void Open()
|
|
14
|
-
{
|
|
15
|
-
var win = GetWindow<WxMiniConfigWindow>();
|
|
16
|
-
win.titleContent = new GUIContent("微信小游戏发布配置");
|
|
17
|
-
win.minSize = new Vector2(500, 450);
|
|
18
|
-
win.Show();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
private void OnGUI()
|
|
22
|
-
{
|
|
23
|
-
var config = WxMiniConfig.Default;
|
|
24
|
-
var rect = new Rect(0, 0, position.width, position.height);
|
|
25
|
-
var area = rect;
|
|
26
|
-
area.width -= 8;
|
|
27
|
-
area.height -= 8;
|
|
28
|
-
GUILayout.BeginArea(area);
|
|
29
|
-
_scroll = GUILayout.BeginScrollView(_scroll);
|
|
30
|
-
config.AppId = GUILayout.TextField("AppId", config.AppId);
|
|
31
|
-
config.ProjectName = GUILayout.TextField("游戏名", config.ProjectName);
|
|
32
|
-
config.CDN = GUILayout.TextField("CDN", config.CDN);
|
|
33
|
-
GUILayout.BeginHorizontal();
|
|
34
|
-
GUILayout.Label("屏幕朝向");
|
|
35
|
-
if (GUILayout.Button(config.ScreenOrientation == WxMiniConfig.Orientation.Portrait ? "竖屏" : "横屏"))
|
|
36
|
-
{
|
|
37
|
-
var menu = new GenericMenu();
|
|
38
|
-
menu.AddItem(new GUIContent("竖屏"), false,
|
|
39
|
-
() =>
|
|
40
|
-
{
|
|
41
|
-
config.ScreenOrientation = WxMiniConfig.Orientation.Portrait;
|
|
42
|
-
config.Save();
|
|
43
|
-
});
|
|
44
|
-
menu.AddItem(new GUIContent("横屏"), false,
|
|
45
|
-
() =>
|
|
46
|
-
{
|
|
47
|
-
config.ScreenOrientation = WxMiniConfig.Orientation.Landscape;
|
|
48
|
-
config.Save();
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
GUILayout.EndHorizontal();
|
|
52
|
-
config.MemorySize = EditorGUILayout.IntSlider("分配内存", config.MemorySize, 256, 1024);
|
|
53
|
-
config.DST = GUILayout.TextField("导出目录", config.DST);
|
|
54
|
-
GUILayout.EndScrollView();
|
|
55
|
-
GUILayout.EndArea();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|