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
|
@@ -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
|
-
}
|
package/Runtime/UnityToJs.cs
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
using System.Collections;
|
|
2
|
-
using System.Collections.Generic;
|
|
3
|
-
using System.Runtime.InteropServices;
|
|
4
|
-
using UnityEngine;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
namespace TyphoonUnitySDK
|
|
8
|
-
{
|
|
9
|
-
/// <summary>
|
|
10
|
-
/// unity 调用 js
|
|
11
|
-
/// </summary>
|
|
12
|
-
public class UnityToJs
|
|
13
|
-
{
|
|
14
|
-
[DllImport("__Internal")]
|
|
15
|
-
private static extern void WebMethodCall(string msg);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[DllImport("__Internal")]
|
|
19
|
-
private static extern string WebMethodGet(string msg);
|
|
20
|
-
|
|
21
|
-
public static void MethodCall(string msg)
|
|
22
|
-
{
|
|
23
|
-
#if UNITY_EDITOR
|
|
24
|
-
Debug.Log($"## unity call js {msg}");
|
|
25
|
-
#else
|
|
26
|
-
WebMethodCall(msg);
|
|
27
|
-
#endif
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
public static string MethodGet(string msg)
|
|
32
|
-
{
|
|
33
|
-
#if UNITY_EDITOR
|
|
34
|
-
Debug.Log($"## unity get js {msg}");
|
|
35
|
-
return msg;
|
|
36
|
-
#else
|
|
37
|
-
return WebMethodGet(msg);
|
|
38
|
-
#endif
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/*无回调的方式*/
|
|
42
|
-
public static void MethodCall(string method, object data)
|
|
43
|
-
{
|
|
44
|
-
var send = new
|
|
45
|
-
{
|
|
46
|
-
method,
|
|
47
|
-
data,
|
|
48
|
-
};
|
|
49
|
-
MethodCall(send.ToJson());
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/*带回调的方式*/
|
|
53
|
-
public static void MethodCall(SessionItem session)
|
|
54
|
-
{
|
|
55
|
-
var send = new
|
|
56
|
-
{
|
|
57
|
-
session = session.SessionId,
|
|
58
|
-
method = session.MethodName,
|
|
59
|
-
data = session.SendData,
|
|
60
|
-
};
|
|
61
|
-
MethodCall(send.ToJson());
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|