com.typhoon.unitysdk 1.0.28 → 1.0.30
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 +1 -1
- package/Editor/ApplyTool.cs +22 -1
- package/Runtime/BaseSdk.cs +1 -1
- package/Runtime/SDKInteractiveUI.cs +1 -1
- package/Runtime/TestSdk.cs +2 -1
- package/Runtime/TyphoonSdk.cs +31 -10
- package/Runtime/WxMiniTouchInputSupport.cs +1 -0
- package/Sources~/Package/ChinaAndroid.unitypackage +0 -0
- package/Sources~/Package/ChinaAndroid.unitypackage.manifest +0 -3
- package/Sources~/Package/Douyin.unitypackage +0 -0
- package/Sources~/Package/Douyin.unitypackage.manifest +0 -3
- package/Sources~/Package/GooglePlay.unitypackage +0 -0
- package/Sources~/Package/GooglePlay.unitypackage.manifest +0 -3
- package/Sources~/Package/WxMini.unitypackage +0 -0
- package/Sources~/Package/WxMini.unitypackage.manifest +0 -2
- package/package.json +1 -1
- package/Runtime/Resources/TYPHOON_SDK_TEST.prefab +0 -45
- package/Runtime/Resources/TYPHOON_SDK_TEST.prefab.meta +0 -7
|
@@ -184,7 +184,7 @@ namespace TyphoonUnitySDK
|
|
|
184
184
|
settings.activeProfileId = profileId;
|
|
185
185
|
foreach (var element in publish.AAVariableModify)
|
|
186
186
|
{
|
|
187
|
-
SetVariable(
|
|
187
|
+
SetVariable(publish.AAUseProfile, element.VariableName, element.VariableValue);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
EditorUtility.SetDirty(settings);
|
package/Editor/ApplyTool.cs
CHANGED
|
@@ -39,7 +39,6 @@ namespace TyphoonUnitySDK
|
|
|
39
39
|
var done = SwitchPlatformTo(setting.BuildTarget);
|
|
40
40
|
if (done)
|
|
41
41
|
{
|
|
42
|
-
|
|
43
42
|
//修改参数
|
|
44
43
|
switch (setting.BuildTarget)
|
|
45
44
|
{
|
|
@@ -364,6 +363,28 @@ namespace TyphoonUnitySDK
|
|
|
364
363
|
|
|
365
364
|
File.Delete(path);
|
|
366
365
|
}
|
|
366
|
+
|
|
367
|
+
//如果仅存在.meta文件,清理文件夹
|
|
368
|
+
var clearFolder = true;
|
|
369
|
+
var remnant = Directory.GetFiles(folder, "*", SearchOption.AllDirectories);
|
|
370
|
+
foreach (var element in remnant)
|
|
371
|
+
{
|
|
372
|
+
if (!element.EndsWith(".meta"))
|
|
373
|
+
{
|
|
374
|
+
// if (folder == "Assets/Plugins/Android")
|
|
375
|
+
// {
|
|
376
|
+
// Debug.Log(element);
|
|
377
|
+
// }
|
|
378
|
+
clearFolder = false;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
//删除残余文件夹
|
|
383
|
+
if (clearFolder)
|
|
384
|
+
{
|
|
385
|
+
// Debug.Log($"删除:{folder}");
|
|
386
|
+
Directory.Delete(folder, true);
|
|
387
|
+
}
|
|
367
388
|
}
|
|
368
389
|
}
|
|
369
390
|
|
package/Runtime/BaseSdk.cs
CHANGED
|
@@ -618,6 +618,7 @@ namespace TyphoonUnitySDK
|
|
|
618
618
|
EditorGUI.DrawRect(rectProcess, Color.green * 0.5f);
|
|
619
619
|
if (process >= 1)
|
|
620
620
|
{
|
|
621
|
+
holdTime = 0;
|
|
621
622
|
hideHandler?.Invoke();
|
|
622
623
|
}
|
|
623
624
|
}
|
|
@@ -633,7 +634,6 @@ namespace TyphoonUnitySDK
|
|
|
633
634
|
}
|
|
634
635
|
}
|
|
635
636
|
|
|
636
|
-
|
|
637
637
|
public static Type GetType(string typeName)
|
|
638
638
|
{
|
|
639
639
|
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
|
package/Runtime/TestSdk.cs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
using System;
|
|
2
|
+
using UnityEngine.Scripting;
|
|
2
3
|
|
|
3
4
|
namespace TyphoonUnitySDK
|
|
4
5
|
{
|
|
6
|
+
[Preserve]
|
|
5
7
|
public class TestSdk : BaseSdk
|
|
6
8
|
{
|
|
7
9
|
public override void OnCreate()
|
|
8
10
|
{
|
|
9
|
-
DontDestroyOnLoad(gameObject);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
public override void InitSdk(Action success, Action<string> fail)
|
package/Runtime/TyphoonSdk.cs
CHANGED
|
@@ -13,12 +13,12 @@ namespace TyphoonUnitySDK
|
|
|
13
13
|
/*绑定SDK实例*/
|
|
14
14
|
public static Dictionary<AppChannel, string> SDKBindings = new Dictionary<AppChannel, string>
|
|
15
15
|
{
|
|
16
|
-
{ AppChannel.Test, "
|
|
17
|
-
{ AppChannel.ChinaAndroid, "
|
|
18
|
-
{ AppChannel.WxMini, "
|
|
19
|
-
{ AppChannel.DouyinAndroid, "
|
|
20
|
-
{ AppChannel.DouyinIOS, "
|
|
21
|
-
{ AppChannel.GooglePlay, "
|
|
16
|
+
{ AppChannel.Test, "TyphoonUnitySDK.TestSdk" }, //测试渠道
|
|
17
|
+
{ AppChannel.ChinaAndroid, "TyphoonUnitySDK.ChinaAndroidSdk" }, //国内安卓
|
|
18
|
+
{ AppChannel.WxMini, "TyphoonUnitySDK.WxMiniSdk" }, //微信小游戏
|
|
19
|
+
{ AppChannel.DouyinAndroid, "TyphoonUnitySDK.DouyinSdk" }, //抖音小游戏
|
|
20
|
+
{ AppChannel.DouyinIOS, "TyphoonUnitySDK.DouyinSdk" }, //抖音小游戏
|
|
21
|
+
{ AppChannel.GooglePlay, "TyphoonUnitySDK.GooglePlaySdk" }, //GooglePlay
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
private ISdk _sdk;
|
|
@@ -40,10 +40,14 @@ namespace TyphoonUnitySDK
|
|
|
40
40
|
#endif
|
|
41
41
|
if (SDKBindings.TryGetValue(AppConfig.Channel, out var match))
|
|
42
42
|
{
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
var type = GetType(match);
|
|
44
|
+
if (type == null)
|
|
45
|
+
{
|
|
46
|
+
throw new Exception($"找不到sdk实例type:{match}");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var instance = Activator.CreateInstance(type);
|
|
50
|
+
_sdk = instance as ISdk;
|
|
47
51
|
_sdk.OnCreate();
|
|
48
52
|
}
|
|
49
53
|
else
|
|
@@ -52,6 +56,23 @@ namespace TyphoonUnitySDK
|
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
|
|
59
|
+
|
|
60
|
+
// 反射获取type
|
|
61
|
+
private Type GetType(string typeName)
|
|
62
|
+
{
|
|
63
|
+
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
|
|
64
|
+
foreach (var assembly in assemblies)
|
|
65
|
+
{
|
|
66
|
+
var type = assembly.GetType(typeName);
|
|
67
|
+
if (type != null)
|
|
68
|
+
{
|
|
69
|
+
return type;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
|
|
55
76
|
#endregion
|
|
56
77
|
|
|
57
78
|
#region 初始化SDK
|
|
Binary file
|
|
@@ -6,8 +6,5 @@ Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid
|
|
|
6
6
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/ChinaAndroidSdk.cs
|
|
7
7
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/ChinaAndroidSdk.cs.meta
|
|
8
8
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor.meta
|
|
9
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources.meta
|
|
10
9
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor/PublishChinaAndroidAAR.cs
|
|
11
10
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Editor/PublishChinaAndroidAAR.cs.meta
|
|
12
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources/TYPHOON_SDK_CHINA_ANDROID.prefab
|
|
13
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/ChinaAndroid/Resources/TYPHOON_SDK_CHINA_ANDROID.prefab.meta
|
|
Binary file
|
|
@@ -94,10 +94,7 @@ Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/DouyinBannerAd.cs.meta
|
|
|
94
94
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/DouyinSdk.cs
|
|
95
95
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/DouyinSdk.cs.meta
|
|
96
96
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Editor.meta
|
|
97
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Resources.meta
|
|
98
97
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Editor/PublishDouyinAndroid.cs
|
|
99
98
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Editor/PublishDouyinAndroid.cs.meta
|
|
100
99
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Editor/PublishDouyinIOS.cs
|
|
101
100
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Editor/PublishDouyinIOS.cs.meta
|
|
102
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Resources/TYPHOON_SDK_DOUYIN_MINI.prefab
|
|
103
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/Douyin/Resources/TYPHOON_SDK_DOUYIN_MINI.prefab.meta
|
|
Binary file
|
|
@@ -2,8 +2,5 @@ Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay
|
|
|
2
2
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay/Editor.meta
|
|
3
3
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay/GooglePlaySdk.cs
|
|
4
4
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay/GooglePlaySdk.cs.meta
|
|
5
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay/Resources.meta
|
|
6
5
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay/Editor/PublishGooglePlay.cs
|
|
7
6
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay/Editor/PublishGooglePlay.cs.meta
|
|
8
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay/Resources/TYPHOON_SDK_GOOGLE_PLAY.prefab
|
|
9
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/GooglePlay/Resources/TYPHOON_SDK_GOOGLE_PLAY.prefab.meta
|
|
Binary file
|
|
@@ -391,7 +391,5 @@ Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini/Editor/typhoon-unity-wx.js
|
|
|
391
391
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini/Editor/typhoon-unity-wx.js.meta
|
|
392
392
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini/Plugins/_unity_js_bridge.jslib
|
|
393
393
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini/Plugins/_unity_js_bridge.jslib.meta
|
|
394
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini/Resources/TYPHOON_SDK_WX_MINI.prefab
|
|
395
|
-
Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini/Resources/TYPHOON_SDK_WX_MINI.prefab.meta
|
|
396
394
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini/Resources/WX_TOUCH_INPUT_OVERRIDE.prefab
|
|
397
395
|
Assets/Typhoon_Gen/TyphoonSDK/Runtime/WxMini/Resources/WX_TOUCH_INPUT_OVERRIDE.prefab.meta
|
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.30","description":"","unity":"2018.1","type":"tool","hideInEditor":false,"author":{"name":"Jan Zhang","email":"","url":""},"changelogUrl":"","documentationUrl":"","keywords":["typhoon"],"license":"","licensesUrl":"","customDependencies":[{"PackageName":"com.unity.nuget.newtonsoft-json","Value":"2.0.0"}],"dependencies":{"com.unity.nuget.newtonsoft-json":"2.0.0"}}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
%YAML 1.1
|
|
2
|
-
%TAG !u! tag:unity3d.com,2011:
|
|
3
|
-
--- !u!1 &3052855270983707171
|
|
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: 2699745964915742218}
|
|
12
|
-
- component: {fileID: 2587331464460211208}
|
|
13
|
-
m_Layer: 0
|
|
14
|
-
m_Name: TYPHOON_SDK_TEST
|
|
15
|
-
m_TagString: Untagged
|
|
16
|
-
m_Icon: {fileID: 0}
|
|
17
|
-
m_NavMeshLayer: 0
|
|
18
|
-
m_StaticEditorFlags: 0
|
|
19
|
-
m_IsActive: 1
|
|
20
|
-
--- !u!4 &2699745964915742218
|
|
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: 3052855270983707171}
|
|
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 &2587331464460211208
|
|
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: 3052855270983707171}
|
|
41
|
-
m_Enabled: 1
|
|
42
|
-
m_EditorHideFlags: 0
|
|
43
|
-
m_Script: {fileID: 11500000, guid: c2fd32a072371b04b84c786471b7723a, type: 3}
|
|
44
|
-
m_Name:
|
|
45
|
-
m_EditorClassIdentifier:
|