com.typhoon.unitysdk 1.0.20 → 1.0.23
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 +31 -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 +4 -2
- package/Editor/PublishResult.cs +5 -0
- package/Editor/PublishSetting.cs +3 -0
- package/Editor/PublishSettingGUIDrawer.cs +19 -0
- package/Editor/PublishTool.cs +4 -1
- package/Editor/PublishVivoBatSettingInspector.cs +1 -1
- package/Editor/PublishWindow.cs +3 -2
- package/Editor/Texture/sdk_white4x4.png +0 -0
- package/Editor/Texture/sdk_white4x4.png.meta +144 -0
- package/Editor/UniEditor.cs +6 -0
- package/Runtime/AppConfig.cs +16 -0
- package/Runtime/AppConfigAsset.cs +5 -2
- package/Runtime/BaseSdk.cs +44 -3
- package/Runtime/Interface.cs +34 -2
- package/Runtime/Model.cs +25 -0
- package/Runtime/{UnityToJs.cs.meta → Model.cs.meta} +1 -1
- package/Runtime/RuntimeUtil.cs +23 -0
- package/Runtime/RuntimeUtil.cs.meta +11 -0
- package/Runtime/SDKInteractiveUI.cs +2 -13
- package/Runtime/SimulateRecordGame.cs +208 -0
- package/Runtime/SimulateRecordGame.cs.meta +11 -0
- package/Runtime/TyphoonSdk.cs +123 -0
- package/Sources~/Package/ChinaAndroid.unitypackage +0 -0
- package/Sources~/Package/Douyin.unitypackage +0 -0
- package/Sources~/Package/Douyin.unitypackage.manifest +103 -0
- package/Sources~/Package/WxMini.unitypackage +0 -0
- package/Sources~/Package/WxMini.unitypackage.manifest +2 -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/Runtime/UnityToJs.cs +0 -64
package/Editor/ApplyTool.cs
CHANGED
|
@@ -25,6 +25,8 @@ namespace TyphoonUnitySDK
|
|
|
25
25
|
{ AppChannel.ChinaAndroid, new ApplyChinaAndroid() },
|
|
26
26
|
{ AppChannel.Test, new ApplyTest() },
|
|
27
27
|
{ AppChannel.WxMini, new ApplyWxMini() },
|
|
28
|
+
{ AppChannel.DouyinAndroid, new ApplyDouyinAndroidOrIOS() },
|
|
29
|
+
{ AppChannel.DouyinIOS, new ApplyDouyinAndroidOrIOS() },
|
|
28
30
|
};
|
|
29
31
|
|
|
30
32
|
|
|
@@ -67,12 +69,14 @@ namespace TyphoonUnitySDK
|
|
|
67
69
|
//保存所有配置
|
|
68
70
|
setting.Save();
|
|
69
71
|
WxMiniConfig.Default.Save();
|
|
72
|
+
DouyinConfig.Default.Save();
|
|
70
73
|
InvokeOnApplyStart(setting);
|
|
71
74
|
if (!Applies.TryGetValue(setting.Channel, out var match))
|
|
72
75
|
{
|
|
73
76
|
Debug.LogError($"未处理Apply:{setting.Channel}");
|
|
74
77
|
return;
|
|
75
78
|
}
|
|
79
|
+
|
|
76
80
|
match.Apply(setting);
|
|
77
81
|
InvokeOnApplyEnd(setting);
|
|
78
82
|
}
|
|
@@ -248,6 +252,12 @@ namespace TyphoonUnitySDK
|
|
|
248
252
|
AppConfigAsset.Instance.Version = setting.VersionString;
|
|
249
253
|
AppConfigAsset.Instance.VersionType = setting.VersionType;
|
|
250
254
|
AppConfigAsset.Instance.PublishTime = DateTime.Now.ToString("yyyyMMddHHmmss");
|
|
255
|
+
|
|
256
|
+
//写入抖音小游戏参数
|
|
257
|
+
AppConfigAsset.Instance.DouyinVideoId = DouyinConfig.Default.VideoId;
|
|
258
|
+
AppConfigAsset.Instance.DouyinIntersId = DouyinConfig.Default.IntersId;
|
|
259
|
+
AppConfigAsset.Instance.DouyinBannerId = DouyinConfig.Default.BannerId;
|
|
260
|
+
|
|
251
261
|
EditorUtility.SetDirty(AppConfigAsset.Instance);
|
|
252
262
|
AssetDatabase.SaveAssets();
|
|
253
263
|
}
|
|
@@ -364,6 +374,7 @@ namespace TyphoonUnitySDK
|
|
|
364
374
|
"Assets/Typhoon_Gen/TyphoonSDK/Runtime",
|
|
365
375
|
"Assets/WX-WASM-SDK-V2",
|
|
366
376
|
"Assets/WebGLTemplates",
|
|
377
|
+
"Assets/Plugins/ByteGame",
|
|
367
378
|
};
|
|
368
379
|
|
|
369
380
|
|
|
@@ -423,5 +434,25 @@ namespace TyphoonUnitySDK
|
|
|
423
434
|
AssetDatabase.Refresh();
|
|
424
435
|
}
|
|
425
436
|
}
|
|
437
|
+
|
|
438
|
+
/*抖音android,IOS*/
|
|
439
|
+
public class ApplyDouyinAndroidOrIOS : IApply
|
|
440
|
+
{
|
|
441
|
+
public void Apply(PublishSetting setting)
|
|
442
|
+
{
|
|
443
|
+
Debug.Log($"导入... {UniEditor.PackagePath_Douyin}");
|
|
444
|
+
ImportUnityPackage(UniEditor.PackagePath_Douyin);
|
|
445
|
+
var manifest_path = $"{UniEditor.PackagePath_Douyin}.manifest";
|
|
446
|
+
Debug.Log($"读取资源清单...{manifest_path}");
|
|
447
|
+
var manifest = ReadManifest(manifest_path);
|
|
448
|
+
Debug.Log($"清理多余文件...");
|
|
449
|
+
foreach (var folder in MaybeFolder)
|
|
450
|
+
{
|
|
451
|
+
ClearFilesInDirectory(folder, manifest);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
AssetDatabase.Refresh();
|
|
455
|
+
}
|
|
456
|
+
}
|
|
426
457
|
}
|
|
427
458
|
}
|
|
@@ -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,10 @@ 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
|
+
{ PublishProcess.DouyinIOS, "TyphoonUnitySDK.PublishDouyinIOS" }
|
|
28
|
+
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
/// <summary>
|
package/Editor/PublishWindow.cs
CHANGED
|
@@ -16,8 +16,8 @@ namespace TyphoonUnitySDK
|
|
|
16
16
|
// AppChannel.WxMini,
|
|
17
17
|
AppChannel.VivoMini,
|
|
18
18
|
AppChannel.OppoMini,
|
|
19
|
-
AppChannel.DouyinAndroid,
|
|
20
|
-
AppChannel.DouyinIOS,
|
|
19
|
+
// AppChannel.DouyinAndroid,
|
|
20
|
+
// AppChannel.DouyinIOS,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
private static bool IsLocked(PublishSetting setting)
|
|
@@ -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
|
|
|
Binary file
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
fileFormatVersion: 2
|
|
2
|
+
guid: ba1cda5949ba4524c8ee711b47d1fa6a
|
|
3
|
+
TextureImporter:
|
|
4
|
+
internalIDToNameTable: []
|
|
5
|
+
externalObjects: {}
|
|
6
|
+
serializedVersion: 11
|
|
7
|
+
mipmaps:
|
|
8
|
+
mipMapMode: 0
|
|
9
|
+
enableMipMap: 0
|
|
10
|
+
sRGBTexture: 1
|
|
11
|
+
linearTexture: 0
|
|
12
|
+
fadeOut: 0
|
|
13
|
+
borderMipMap: 0
|
|
14
|
+
mipMapsPreserveCoverage: 0
|
|
15
|
+
alphaTestReferenceValue: 0.5
|
|
16
|
+
mipMapFadeDistanceStart: 1
|
|
17
|
+
mipMapFadeDistanceEnd: 3
|
|
18
|
+
bumpmap:
|
|
19
|
+
convertToNormalMap: 0
|
|
20
|
+
externalNormalMap: 0
|
|
21
|
+
heightScale: 0.25
|
|
22
|
+
normalMapFilter: 0
|
|
23
|
+
isReadable: 0
|
|
24
|
+
streamingMipmaps: 0
|
|
25
|
+
streamingMipmapsPriority: 0
|
|
26
|
+
vTOnly: 0
|
|
27
|
+
grayScaleToAlpha: 0
|
|
28
|
+
generateCubemap: 6
|
|
29
|
+
cubemapConvolution: 0
|
|
30
|
+
seamlessCubemap: 0
|
|
31
|
+
textureFormat: 1
|
|
32
|
+
maxTextureSize: 2048
|
|
33
|
+
textureSettings:
|
|
34
|
+
serializedVersion: 2
|
|
35
|
+
filterMode: 1
|
|
36
|
+
aniso: 1
|
|
37
|
+
mipBias: 0
|
|
38
|
+
wrapU: 1
|
|
39
|
+
wrapV: 1
|
|
40
|
+
wrapW: 0
|
|
41
|
+
nPOTScale: 0
|
|
42
|
+
lightmap: 0
|
|
43
|
+
compressionQuality: 50
|
|
44
|
+
spriteMode: 1
|
|
45
|
+
spriteExtrude: 1
|
|
46
|
+
spriteMeshType: 1
|
|
47
|
+
alignment: 0
|
|
48
|
+
spritePivot: {x: 0.5, y: 0.5}
|
|
49
|
+
spritePixelsToUnits: 100
|
|
50
|
+
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
|
51
|
+
spriteGenerateFallbackPhysicsShape: 1
|
|
52
|
+
alphaUsage: 1
|
|
53
|
+
alphaIsTransparency: 1
|
|
54
|
+
spriteTessellationDetail: -1
|
|
55
|
+
textureType: 8
|
|
56
|
+
textureShape: 1
|
|
57
|
+
singleChannelComponent: 0
|
|
58
|
+
flipbookRows: 1
|
|
59
|
+
flipbookColumns: 1
|
|
60
|
+
maxTextureSizeSet: 0
|
|
61
|
+
compressionQualitySet: 0
|
|
62
|
+
textureFormatSet: 0
|
|
63
|
+
ignorePngGamma: 0
|
|
64
|
+
applyGammaDecoding: 0
|
|
65
|
+
platformSettings:
|
|
66
|
+
- serializedVersion: 3
|
|
67
|
+
buildTarget: DefaultTexturePlatform
|
|
68
|
+
maxTextureSize: 2048
|
|
69
|
+
resizeAlgorithm: 0
|
|
70
|
+
textureFormat: -1
|
|
71
|
+
textureCompression: 1
|
|
72
|
+
compressionQuality: 50
|
|
73
|
+
crunchedCompression: 0
|
|
74
|
+
allowsAlphaSplitting: 0
|
|
75
|
+
overridden: 0
|
|
76
|
+
androidETC2FallbackOverride: 0
|
|
77
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
78
|
+
- serializedVersion: 3
|
|
79
|
+
buildTarget: Standalone
|
|
80
|
+
maxTextureSize: 2048
|
|
81
|
+
resizeAlgorithm: 0
|
|
82
|
+
textureFormat: -1
|
|
83
|
+
textureCompression: 1
|
|
84
|
+
compressionQuality: 50
|
|
85
|
+
crunchedCompression: 0
|
|
86
|
+
allowsAlphaSplitting: 0
|
|
87
|
+
overridden: 0
|
|
88
|
+
androidETC2FallbackOverride: 0
|
|
89
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
90
|
+
- serializedVersion: 3
|
|
91
|
+
buildTarget: iPhone
|
|
92
|
+
maxTextureSize: 2048
|
|
93
|
+
resizeAlgorithm: 0
|
|
94
|
+
textureFormat: -1
|
|
95
|
+
textureCompression: 1
|
|
96
|
+
compressionQuality: 50
|
|
97
|
+
crunchedCompression: 0
|
|
98
|
+
allowsAlphaSplitting: 0
|
|
99
|
+
overridden: 0
|
|
100
|
+
androidETC2FallbackOverride: 0
|
|
101
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
102
|
+
- serializedVersion: 3
|
|
103
|
+
buildTarget: WebGL
|
|
104
|
+
maxTextureSize: 2048
|
|
105
|
+
resizeAlgorithm: 0
|
|
106
|
+
textureFormat: -1
|
|
107
|
+
textureCompression: 1
|
|
108
|
+
compressionQuality: 50
|
|
109
|
+
crunchedCompression: 0
|
|
110
|
+
allowsAlphaSplitting: 0
|
|
111
|
+
overridden: 0
|
|
112
|
+
androidETC2FallbackOverride: 0
|
|
113
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
114
|
+
- serializedVersion: 3
|
|
115
|
+
buildTarget: Android
|
|
116
|
+
maxTextureSize: 2048
|
|
117
|
+
resizeAlgorithm: 0
|
|
118
|
+
textureFormat: -1
|
|
119
|
+
textureCompression: 1
|
|
120
|
+
compressionQuality: 50
|
|
121
|
+
crunchedCompression: 0
|
|
122
|
+
allowsAlphaSplitting: 0
|
|
123
|
+
overridden: 0
|
|
124
|
+
androidETC2FallbackOverride: 0
|
|
125
|
+
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
126
|
+
spriteSheet:
|
|
127
|
+
serializedVersion: 2
|
|
128
|
+
sprites: []
|
|
129
|
+
outline: []
|
|
130
|
+
physicsShape: []
|
|
131
|
+
bones: []
|
|
132
|
+
spriteID: 5e97eb03825dee720800000000000000
|
|
133
|
+
internalID: 0
|
|
134
|
+
vertices: []
|
|
135
|
+
indices:
|
|
136
|
+
edges: []
|
|
137
|
+
weights: []
|
|
138
|
+
secondaryTextures: []
|
|
139
|
+
spritePackingTag:
|
|
140
|
+
pSDRemoveMatte: 0
|
|
141
|
+
pSDShowRemoveMatteOption: 0
|
|
142
|
+
userData:
|
|
143
|
+
assetBundleName:
|
|
144
|
+
assetBundleVariant:
|
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/BaseSdk.cs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
2
3
|
using UnityEngine;
|
|
3
4
|
|
|
4
5
|
namespace TyphoonUnitySDK
|
|
@@ -69,10 +70,50 @@ namespace TyphoonUnitySDK
|
|
|
69
70
|
{
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
|
|
74
|
+
#region 录屏分享(抖音小游戏)
|
|
75
|
+
|
|
76
|
+
/*是否支持录屏分享*/
|
|
77
|
+
public virtual bool CanRecordGame()
|
|
78
|
+
{
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/*开始录屏*/
|
|
83
|
+
public virtual void StartRecordGame(bool isRecordAudio = true, int maxRecordTimeSec = 600,
|
|
84
|
+
Action onStart = null,
|
|
85
|
+
Action<string> onError = null, Action<string> onComplete = null)
|
|
86
|
+
{
|
|
87
|
+
onError?.Invoke("not support");
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/*停止录屏*/
|
|
91
|
+
public virtual void StopRecordGame(Action<string> complete = null, Action<string> onError = null,
|
|
92
|
+
List<TimeClip> clips = null, bool autoMerge = true)
|
|
93
|
+
{
|
|
94
|
+
onError?.Invoke("not support");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*获取录屏时长*/
|
|
98
|
+
public virtual float GetRecordDuration()
|
|
99
|
+
{
|
|
100
|
+
return 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/*是否可分享录屏*/
|
|
104
|
+
public virtual bool CanShareRecordGame()
|
|
74
105
|
{
|
|
75
|
-
|
|
106
|
+
return false;
|
|
76
107
|
}
|
|
108
|
+
|
|
109
|
+
/*分享录屏*/
|
|
110
|
+
public virtual void ShareRecordGame(string title, List<string> topics, Action success,
|
|
111
|
+
Action<string> fail = null,
|
|
112
|
+
Action cancel = null)
|
|
113
|
+
{
|
|
114
|
+
fail?.Invoke("not support");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
#endregion
|
|
77
118
|
}
|
|
78
119
|
}
|