com.typhoon.unitysdk 1.0.34 → 1.0.35
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 +29 -6
- package/Editor/ExportModule.cs +22 -0
- package/Editor/GUIDrawer.cs +22 -0
- package/Editor/MD5Tool.cs +53 -0
- package/Editor/MD5Tool.cs.meta +11 -0
- package/Editor/Orientation.cs +18 -0
- package/Editor/Orientation.cs.meta +11 -0
- package/Editor/PluginModuleInstaller.cs +432 -0
- package/Editor/PluginModuleInstaller.cs.meta +11 -0
- package/Editor/PublishSetting.cs +3 -0
- package/Editor/PublishSettingGUIDrawer.cs +19 -1
- package/Editor/PublishWindow.cs +1 -1
- package/Editor/UniEditor.cs +164 -7
- package/Editor/VivoMiniConfig.cs +301 -0
- package/Editor/VivoMiniConfig.cs.meta +11 -0
- package/Editor/WxMiniConfig.cs +4 -19
- package/Editor/XGameDotNetZip.dll +0 -0
- package/Editor/XGameDotNetZip.dll.meta +33 -0
- package/Editor/ZipTool.cs +78 -0
- package/Editor/ZipTool.cs.meta +11 -0
- package/Editor/bats/create-sign.bat +12 -0
- package/Editor/bats/create-sign.bat.meta +7 -0
- package/Editor/bats.meta +8 -0
- package/Runtime/BaseSdk.cs +64 -0
- package/Runtime/HttpGetSuccessResult.cs +23 -0
- package/Runtime/HttpGetSuccessResult.cs.meta +11 -0
- package/Runtime/HttpPostSuccessResult.cs +30 -0
- package/Runtime/HttpPostSuccessResult.cs.meta +11 -0
- package/Runtime/Interface.cs +21 -2
- package/Runtime/SDKHttpClient.cs +119 -0
- package/Runtime/SDKHttpClient.cs.meta +11 -0
- package/Runtime/TyphoonSdk.cs +42 -0
- package/Sources~/Package/ChinaAndroid.unitypackage +0 -0
- package/Sources~/Package/VivoMini.unitypackage +0 -0
- package/Sources~/Package/VivoMini.unitypackage.manifest +17 -0
- package/package.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using System.IO;
|
|
4
|
+
using System.Text;
|
|
5
|
+
using xgame.Zip;
|
|
6
|
+
using xgame.Zlib;
|
|
7
|
+
|
|
8
|
+
namespace TyphoonUnitySDK
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
/// zip工具
|
|
12
|
+
/// </summary>
|
|
13
|
+
public class ZipTool
|
|
14
|
+
{
|
|
15
|
+
/// <summary>
|
|
16
|
+
/// 压缩成zip
|
|
17
|
+
/// </summary>
|
|
18
|
+
/// <param name="outputZipFile">xx.zip保存位置</param>
|
|
19
|
+
/// <param name="manifest">压缩成zip的清单,key:源文件,value:zip中的相对路径(填null或""表示不处理)</param>
|
|
20
|
+
public static void Zip(string outputZipFile, Dictionary<string, string> manifest)
|
|
21
|
+
{
|
|
22
|
+
using (ZipFile zip = new ZipFile(outputZipFile, Encoding.Default))
|
|
23
|
+
{
|
|
24
|
+
foreach (var kv in manifest)
|
|
25
|
+
{
|
|
26
|
+
var from = kv.Key;
|
|
27
|
+
var inside = kv.Value ?? "";
|
|
28
|
+
zip.AddItem(from, inside);
|
|
29
|
+
}
|
|
30
|
+
#if !UNITY_2021_1_OR_NEWER
|
|
31
|
+
zip.CompressionLevel = CompressionLevel.BestCompression;
|
|
32
|
+
#endif
|
|
33
|
+
zip.Save();
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/// <summary>
|
|
38
|
+
/// 解压zip到指定文件夹
|
|
39
|
+
/// </summary>
|
|
40
|
+
/// <param name="zipFile">zip文件路径</param>
|
|
41
|
+
/// <param name="output">解压zip内容到指定目录(不会补充zip文件名作为目录)</param>
|
|
42
|
+
/// <param name="complete">完成回调</param>
|
|
43
|
+
/// <param name="onProcess">解压进度</param>
|
|
44
|
+
/// <exception cref="Exception"></exception>
|
|
45
|
+
public static void UnZip(string zipFile, string output, Action complete, Action<float> onProcess = null)
|
|
46
|
+
{
|
|
47
|
+
if (!zipFile.EndsWith(".zip"))
|
|
48
|
+
{
|
|
49
|
+
throw new Exception($"只支持.zip文件");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (!File.Exists(zipFile))
|
|
53
|
+
{
|
|
54
|
+
throw new Exception($"找不到文件:{zipFile}");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//解压文件到目录
|
|
58
|
+
using (ZipFile zip = ZipFile.Read(Path.GetFullPath(zipFile)))
|
|
59
|
+
{
|
|
60
|
+
var totalFiles = zip.Count;
|
|
61
|
+
var filesExtracted = 0;
|
|
62
|
+
zip.ExtractProgress += (a, e) =>
|
|
63
|
+
{
|
|
64
|
+
if (e.EventType != ZipProgressEventType.Extracting_BeforeExtractEntry)
|
|
65
|
+
return;
|
|
66
|
+
filesExtracted++;
|
|
67
|
+
var progress = (float)filesExtracted / totalFiles;
|
|
68
|
+
onProcess?.Invoke(progress);
|
|
69
|
+
if (filesExtracted >= totalFiles)
|
|
70
|
+
{
|
|
71
|
+
complete?.Invoke();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
zip.ExtractAll(output, ExtractExistingFileAction.OverwriteSilently);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
cd /d "$OPENSSL_BIN$"
|
|
2
|
+
call openssl req -newkey rsa:2048 -nodes -keyout private.pem -x509 -config "$OPENSSL_CONF$" -out certificate.pem
|
|
3
|
+
|
|
4
|
+
if %errorlevel% equ 0 (
|
|
5
|
+
echo Build completed successfully.
|
|
6
|
+
rem copy to sign folder
|
|
7
|
+
call explorer "$OPENSSL_BIN$"
|
|
8
|
+
exit
|
|
9
|
+
) else (
|
|
10
|
+
echo Build encountered an error.
|
|
11
|
+
pause
|
|
12
|
+
)
|
package/Editor/bats.meta
ADDED
package/Runtime/BaseSdk.cs
CHANGED
|
@@ -9,15 +9,41 @@ namespace TyphoonUnitySDK
|
|
|
9
9
|
/// </summary>
|
|
10
10
|
public abstract class BaseSdk : ISdk
|
|
11
11
|
{
|
|
12
|
+
private SDKHttpClient _sdkHttpClient = null;
|
|
13
|
+
|
|
14
|
+
public SDKHttpClient SDKHttpClient
|
|
15
|
+
{
|
|
16
|
+
get
|
|
17
|
+
{
|
|
18
|
+
if (_sdkHttpClient == null)
|
|
19
|
+
{
|
|
20
|
+
_sdkHttpClient = SDKHttpClient.CreateInstance();
|
|
21
|
+
GameObject.DontDestroyOnLoad(_sdkHttpClient.gameObject);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return _sdkHttpClient;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
12
28
|
/*OnCreate*/
|
|
13
29
|
public abstract void OnCreate();
|
|
14
30
|
|
|
31
|
+
#region 初始化
|
|
32
|
+
|
|
15
33
|
/*初始化SDK*/
|
|
16
34
|
public abstract void InitSdk(Action success, Action<string> fail);
|
|
17
35
|
|
|
36
|
+
#endregion
|
|
37
|
+
|
|
38
|
+
#region 登录
|
|
39
|
+
|
|
18
40
|
/*登录*/
|
|
19
41
|
public abstract void Login(Action success, Action<string> fail);
|
|
20
42
|
|
|
43
|
+
#endregion
|
|
44
|
+
|
|
45
|
+
#region 退出游戏
|
|
46
|
+
|
|
21
47
|
/*是否支持退出游戏*/
|
|
22
48
|
public virtual bool IsSupportExitGame()
|
|
23
49
|
{
|
|
@@ -29,6 +55,10 @@ namespace TyphoonUnitySDK
|
|
|
29
55
|
{
|
|
30
56
|
}
|
|
31
57
|
|
|
58
|
+
#endregion
|
|
59
|
+
|
|
60
|
+
#region Banner
|
|
61
|
+
|
|
32
62
|
/*展示banner*/
|
|
33
63
|
public virtual void ShowBanner(string scene, BannerPosition position)
|
|
34
64
|
{
|
|
@@ -39,6 +69,9 @@ namespace TyphoonUnitySDK
|
|
|
39
69
|
{
|
|
40
70
|
}
|
|
41
71
|
|
|
72
|
+
#endregion
|
|
73
|
+
|
|
74
|
+
#region 视频广告
|
|
42
75
|
|
|
43
76
|
/*获取激励视频标记*/
|
|
44
77
|
public virtual bool GetVideoFlag()
|
|
@@ -53,11 +86,19 @@ namespace TyphoonUnitySDK
|
|
|
53
86
|
success?.Invoke();
|
|
54
87
|
}
|
|
55
88
|
|
|
89
|
+
#endregion
|
|
90
|
+
|
|
91
|
+
#region 插页广告
|
|
92
|
+
|
|
56
93
|
/*展示插页*/
|
|
57
94
|
public virtual void ShowInters(string scene)
|
|
58
95
|
{
|
|
59
96
|
}
|
|
60
97
|
|
|
98
|
+
#endregion
|
|
99
|
+
|
|
100
|
+
#region 悬浮ICON
|
|
101
|
+
|
|
61
102
|
/*展示悬浮ICON*/
|
|
62
103
|
public virtual void ShowFloatIcon(string scene, float screenXP, float screenYP)
|
|
63
104
|
{
|
|
@@ -68,6 +109,10 @@ namespace TyphoonUnitySDK
|
|
|
68
109
|
{
|
|
69
110
|
}
|
|
70
111
|
|
|
112
|
+
#endregion
|
|
113
|
+
|
|
114
|
+
#region 原生广告
|
|
115
|
+
|
|
71
116
|
/*展示原生广告*/
|
|
72
117
|
public virtual void ShowNative(string scene)
|
|
73
118
|
{
|
|
@@ -78,6 +123,7 @@ namespace TyphoonUnitySDK
|
|
|
78
123
|
{
|
|
79
124
|
}
|
|
80
125
|
|
|
126
|
+
#endregion
|
|
81
127
|
|
|
82
128
|
#region 录屏分享(抖音小游戏)
|
|
83
129
|
|
|
@@ -123,5 +169,23 @@ namespace TyphoonUnitySDK
|
|
|
123
169
|
}
|
|
124
170
|
|
|
125
171
|
#endregion
|
|
172
|
+
|
|
173
|
+
#region Http请求
|
|
174
|
+
|
|
175
|
+
public virtual void HttpPost(string url, string data, Action<HttpPostSuccessResult> success,
|
|
176
|
+
Action<string> fail,
|
|
177
|
+
Dictionary<string, string> header = null, int timeOut = 60)
|
|
178
|
+
{
|
|
179
|
+
SDKHttpClient.Post(url, data, success, fail, header, timeOut);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
public virtual void HttpGet(string url, Action<HttpGetSuccessResult> success, Action<string> fail,
|
|
184
|
+
Dictionary<string, string> header, int timeOut)
|
|
185
|
+
{
|
|
186
|
+
SDKHttpClient.Get(url, success, fail, header, timeOut);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
#endregion
|
|
126
190
|
}
|
|
127
191
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using UnityEngine.Scripting;
|
|
4
|
+
|
|
5
|
+
namespace TyphoonUnitySDK
|
|
6
|
+
{
|
|
7
|
+
//成功返回的数据项
|
|
8
|
+
[Preserve]
|
|
9
|
+
[Serializable]
|
|
10
|
+
public struct HttpGetSuccessResult
|
|
11
|
+
{
|
|
12
|
+
public string Data;
|
|
13
|
+
public Dictionary<string, string> Header;
|
|
14
|
+
public long StatusCode;
|
|
15
|
+
|
|
16
|
+
public HttpGetSuccessResult(string data, Dictionary<string, string> header, long statusCode)
|
|
17
|
+
{
|
|
18
|
+
Data = data;
|
|
19
|
+
Header = header;
|
|
20
|
+
StatusCode = statusCode;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections.Generic;
|
|
3
|
+
using UnityEngine.Scripting;
|
|
4
|
+
|
|
5
|
+
namespace TyphoonUnitySDK
|
|
6
|
+
{
|
|
7
|
+
/// <summary>
|
|
8
|
+
/// post 返回的数据
|
|
9
|
+
/// </summary>
|
|
10
|
+
[Preserve]
|
|
11
|
+
[Serializable]
|
|
12
|
+
public struct HttpPostSuccessResult
|
|
13
|
+
{
|
|
14
|
+
//数据
|
|
15
|
+
public string Data;
|
|
16
|
+
|
|
17
|
+
//请求头
|
|
18
|
+
public Dictionary<string, string> Header;
|
|
19
|
+
|
|
20
|
+
//状态码
|
|
21
|
+
public long StateCode;
|
|
22
|
+
|
|
23
|
+
public HttpPostSuccessResult(string data, Dictionary<string, string> header, long stateCode)
|
|
24
|
+
{
|
|
25
|
+
Data = data;
|
|
26
|
+
Header = header;
|
|
27
|
+
StateCode = stateCode;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
package/Runtime/Interface.cs
CHANGED
|
@@ -7,7 +7,7 @@ namespace TyphoonUnitySDK
|
|
|
7
7
|
/// SDK全功能接口
|
|
8
8
|
/// </summary>
|
|
9
9
|
public interface ISdk : IOnCreate, IInitSdk, ILogin, IExitGame, IBannerAD, IVideoAD, IIntersAD, IFloatIconAD,
|
|
10
|
-
INativeAD, IRecordGame
|
|
10
|
+
INativeAD, IRecordGame, IHttpGet, IHttpPost
|
|
11
11
|
{
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -114,7 +114,6 @@ namespace TyphoonUnitySDK
|
|
|
114
114
|
|
|
115
115
|
#endregion
|
|
116
116
|
|
|
117
|
-
|
|
118
117
|
#region 录屏分享(抖音小游戏)
|
|
119
118
|
|
|
120
119
|
/*录屏分享(抖音)*/
|
|
@@ -145,4 +144,24 @@ namespace TyphoonUnitySDK
|
|
|
145
144
|
}
|
|
146
145
|
|
|
147
146
|
#endregion
|
|
147
|
+
|
|
148
|
+
#region Http Post
|
|
149
|
+
|
|
150
|
+
public interface IHttpPost
|
|
151
|
+
{
|
|
152
|
+
void HttpPost(string url, string data, Action<HttpPostSuccessResult> success, Action<string> fail,
|
|
153
|
+
Dictionary<string, string> header, int timeOut);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
#endregion
|
|
157
|
+
|
|
158
|
+
#region Http Get
|
|
159
|
+
|
|
160
|
+
public interface IHttpGet
|
|
161
|
+
{
|
|
162
|
+
void HttpGet(string url, Action<HttpGetSuccessResult> success, Action<string> fail,
|
|
163
|
+
Dictionary<string, string> header, int timeOut);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
#endregion
|
|
148
167
|
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
using System.Collections;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using System.Text;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
using UnityEngine.Networking;
|
|
7
|
+
using UnityEngine.Scripting;
|
|
8
|
+
|
|
9
|
+
namespace TyphoonUnitySDK
|
|
10
|
+
{
|
|
11
|
+
/// <summary>
|
|
12
|
+
/// 通用HTTP请求
|
|
13
|
+
/// </summary>
|
|
14
|
+
[Preserve]
|
|
15
|
+
public class SDKHttpClient : MonoBehaviour
|
|
16
|
+
{
|
|
17
|
+
public static SDKHttpClient CreateInstance()
|
|
18
|
+
{
|
|
19
|
+
return new GameObject(nameof(SDKHttpClient)).AddComponent<SDKHttpClient>();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
/// post 请求
|
|
24
|
+
/// </summary>
|
|
25
|
+
public void Post(string url, string postData, Action<HttpPostSuccessResult> success, Action<string> fail,
|
|
26
|
+
Dictionary<string, string> header = null, int timeOut = 60)
|
|
27
|
+
{
|
|
28
|
+
//默认走unity 的post
|
|
29
|
+
StartCoroutine(IEUnityHttpPost(url, postData, success, fail, header, timeOut));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
private IEnumerator IEUnityHttpPost(string url, string data, Action<HttpPostSuccessResult> success,
|
|
33
|
+
Action<string> fail, Dictionary<string, string> header, int timeOut)
|
|
34
|
+
{
|
|
35
|
+
var uri = new Uri(url);
|
|
36
|
+
using (UnityWebRequest www = UnityWebRequest.Post(uri, data))
|
|
37
|
+
{
|
|
38
|
+
byte[] bodyRaw = Encoding.UTF8.GetBytes(data);
|
|
39
|
+
www.uploadHandler = (UploadHandler)new UploadHandlerRaw(bodyRaw);
|
|
40
|
+
www.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
|
|
41
|
+
if (timeOut > 0)
|
|
42
|
+
{
|
|
43
|
+
www.timeout = timeOut;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (header != null)
|
|
47
|
+
{
|
|
48
|
+
foreach (var item in header)
|
|
49
|
+
{
|
|
50
|
+
www.SetRequestHeader(item.Key, item.Value);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
yield return www.SendWebRequest();
|
|
55
|
+
if (www.isNetworkError || www.isHttpError)
|
|
56
|
+
{
|
|
57
|
+
//错误
|
|
58
|
+
fail?.Invoke(www.error);
|
|
59
|
+
}
|
|
60
|
+
else
|
|
61
|
+
{
|
|
62
|
+
//成功
|
|
63
|
+
var resultData = new HttpPostSuccessResult(www.downloadHandler.text, www.GetResponseHeaders(),
|
|
64
|
+
www.responseCode);
|
|
65
|
+
success?.Invoke(resultData);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/// <summary>
|
|
72
|
+
/// get 请求
|
|
73
|
+
/// </summary>
|
|
74
|
+
public void Get(string url, Action<HttpGetSuccessResult> success, Action<string> fail,
|
|
75
|
+
Dictionary<string, string> header = null, int timeOut = 60)
|
|
76
|
+
{
|
|
77
|
+
StartCoroutine(IEUnityHttpGet(url, success, fail, header, timeOut));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
private IEnumerator IEUnityHttpGet(string url, Action<HttpGetSuccessResult> success, Action<string> fail,
|
|
82
|
+
Dictionary<string, string> header, int timeOut)
|
|
83
|
+
{
|
|
84
|
+
var uri = new Uri(url);
|
|
85
|
+
using (UnityWebRequest www = UnityWebRequest.Get(uri))
|
|
86
|
+
{
|
|
87
|
+
//设置请求头
|
|
88
|
+
if (header != null)
|
|
89
|
+
{
|
|
90
|
+
foreach (var kv in header)
|
|
91
|
+
{
|
|
92
|
+
www.SetRequestHeader(kv.Key, kv.Value);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
//设置超时
|
|
97
|
+
if (timeOut > 0)
|
|
98
|
+
{
|
|
99
|
+
www.timeout = timeOut;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
www.downloadHandler = (DownloadHandler)new DownloadHandlerBuffer();
|
|
103
|
+
yield return www.SendWebRequest();
|
|
104
|
+
if (www.isNetworkError || www.isHttpError)
|
|
105
|
+
{
|
|
106
|
+
//失败
|
|
107
|
+
fail?.Invoke(www.error);
|
|
108
|
+
}
|
|
109
|
+
else
|
|
110
|
+
{
|
|
111
|
+
//成功
|
|
112
|
+
var resultData = new HttpGetSuccessResult(www.downloadHandler.text, www.GetResponseHeaders(),
|
|
113
|
+
www.responseCode);
|
|
114
|
+
success?.Invoke(resultData);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
package/Runtime/TyphoonSdk.cs
CHANGED
|
@@ -23,6 +23,22 @@ namespace TyphoonUnitySDK
|
|
|
23
23
|
|
|
24
24
|
private ISdk _sdk;
|
|
25
25
|
|
|
26
|
+
private SDKHttpClient _sdkHttpClient = null;
|
|
27
|
+
|
|
28
|
+
public SDKHttpClient SDKHttpClient
|
|
29
|
+
{
|
|
30
|
+
get
|
|
31
|
+
{
|
|
32
|
+
if (_sdkHttpClient == null)
|
|
33
|
+
{
|
|
34
|
+
_sdkHttpClient = SDKHttpClient.CreateInstance();
|
|
35
|
+
GameObject.DontDestroyOnLoad(_sdkHttpClient.gameObject);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return _sdkHttpClient;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
26
42
|
protected override void Init()
|
|
27
43
|
{
|
|
28
44
|
base.Init();
|
|
@@ -542,5 +558,31 @@ namespace TyphoonUnitySDK
|
|
|
542
558
|
}
|
|
543
559
|
|
|
544
560
|
#endregion
|
|
561
|
+
|
|
562
|
+
#region Http请求
|
|
563
|
+
|
|
564
|
+
public virtual void HttpPost(string url, string data, Action<HttpPostSuccessResult> success,
|
|
565
|
+
Action<string> fail,
|
|
566
|
+
Dictionary<string, string> header = null, int timeOut = 60)
|
|
567
|
+
{
|
|
568
|
+
#if UNITY_EDITOR
|
|
569
|
+
SDKHttpClient.Post(url, data, success, fail, header, timeOut);
|
|
570
|
+
return;
|
|
571
|
+
#endif
|
|
572
|
+
_sdk?.HttpPost(url, data, success, fail, header, timeOut);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
public virtual void HttpGet(string url, Action<HttpGetSuccessResult> success, Action<string> fail,
|
|
577
|
+
Dictionary<string, string> header = null, int timeOut = 60)
|
|
578
|
+
{
|
|
579
|
+
#if UNITY_EDITOR
|
|
580
|
+
SDKHttpClient.Get(url, success, fail, header, timeOut);
|
|
581
|
+
return;
|
|
582
|
+
#endif
|
|
583
|
+
_sdk?.HttpGet(url, success, fail, header, timeOut);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
#endregion
|
|
545
587
|
}
|
|
546
588
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini
|
|
2
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Editor.meta
|
|
3
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Plugins.meta
|
|
4
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/UnityToJs.cs
|
|
5
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/UnityToJs.cs.meta
|
|
6
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/VivoMiniSdk.cs
|
|
7
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/VivoMiniSdk.cs.meta
|
|
8
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/VivoMiniSdkCallBack.cs
|
|
9
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/VivoMiniSdkCallBack.cs.meta
|
|
10
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Editor/PublishVivoMini.cs
|
|
11
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Editor/PublishVivoMini.cs.meta
|
|
12
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Editor/typhoon-mini-sdk-vivo.js
|
|
13
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Editor/typhoon-mini-sdk-vivo.js.meta
|
|
14
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Editor/typhoon-unity-vivo.js
|
|
15
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Editor/typhoon-unity-vivo.js.meta
|
|
16
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Plugins/_unity_js_bridge.jslib
|
|
17
|
+
Assets/Typhoon_Gen/TyphoonSDK/Runtime/VivoMini/Plugins/_unity_js_bridge.jslib.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.35","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"}}
|