Skip to content

Commit d03ee1f

Browse files
authoredAug 5, 2024··
Merge pull request #831 from wechat-miniprogram/UDPSocket_Demo
更新api_v2中的网络板块
2 parents 0848b7f + 6d86a39 commit d03ee1f

23 files changed

+330
-99
lines changed
 

‎.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ docs
5656
node_modules
5757
.config/.vitepress/dist
5858
.config/.vitepress/cache
59+
Demo/API_V2/Assets/WX-WASM-SDK-V2/Editor/MiniGameConfig.asset

‎Demo/API_V2/Assets/API/APISO.asset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ MonoBehaviour:
3434
- {fileID: 11400000, guid: 948907759756641618ba1b031955ec2b, type: 2}
3535
- {fileID: 11400000, guid: 14a1a853f10124ee2b276992e2d40448, type: 2}
3636
- {fileID: 11400000, guid: 1aa518b2f8ca04c6e81821bcb9a3cc49, type: 2}
37+
- {fileID: 11400000, guid: 89339dab17a614cbf8abc8469d67cb72, type: 2}
3738
- {fileID: 11400000, guid: 27654a238f98e4f7e8756e4caed418e1, type: 2}

‎Demo/API_V2/Assets/API/Network/NetworkSO.asset

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ MonoBehaviour:
1818
- {fileID: 11400000, guid: 8fb54c5918d454eea90d5147f2c316ea, type: 2}
1919
- {fileID: 11400000, guid: 1e0539509d074443f92d17035efbe40f, type: 2}
2020
- {fileID: 11400000, guid: cdc97aef7249c4216ac09d2321ce8e83, type: 2}
21+
- {fileID: 11400000, guid: 529e27dae48c91748a3fc5f65603e605, type: 2}
2122
- {fileID: 11400000, guid: 8bae636d6ff994bbfba56ae723a63862, type: 2}

‎Demo/API_V2/Assets/API/Network/TCPSocket/TCPSocket.cs

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
using LitJson;
44
using UnityEngine;
55
using WeChatWASM;
6+
67
public class TCPSocket : Details
78
{
89
private WXTCPSocket _tcpSocket;
10+
911
private bool _connected = false;
1012

1113
// 数据
@@ -18,10 +20,9 @@ public class TCPSocket : Details
1820
private byte[] _bufferData3 = new byte[8];
1921

2022
private void Start() {
21-
GameManager.Instance.detailsController.BindExtraButtonAction(0, connect);
23+
GameManager.Instance.detailsController.BindExtraButtonAction(0, connect);
2224
GameManager.Instance.detailsController.BindExtraButtonAction(1, write);
23-
GameManager.Instance.detailsController.BindExtraButtonAction(2, writeBuffer);
24-
GameManager.Instance.detailsController.BindExtraButtonAction(3, close);
25+
GameManager.Instance.detailsController.BindExtraButtonAction(2, close);
2526
}
2627

2728
// 测试 API
@@ -30,6 +31,7 @@ protected override void TestAPI(string[] args)
3031
if(_tcpSocket == null)
3132
{
3233
_tcpSocket = WX.CreateTCPSocket();
34+
3335
Debug.Log("tcpSocket: " + JsonUtility.ToJson(_tcpSocket));
3436

3537
_tcpSocket.OnMessage((res) => {
@@ -49,7 +51,7 @@ protected override void TestAPI(string[] args)
4951
});
5052
} else
5153
{
52-
Debug.Log("tcp实例已初始化");
54+
Debug.LogError("tcp实例已初始化");
5355
}
5456

5557
}
@@ -58,20 +60,19 @@ private void close()
5860
{
5961
if(_tcpSocket != null && _connected)
6062
{
61-
Debug.Log("close test start");
6263
_tcpSocket.Close();
6364
_connected = false;
65+
_tcpSocket = null;
6466
} else
6567
{
66-
Debug.Log("关闭失败:tcp实例未初始化或未连接");
68+
Debug.LogError("关闭失败:tcp实例未初始化或未连接");
6769
}
6870

6971
}
7072

7173

7274
private void connect() {
7375
if (_tcpSocket != null && !_connected) {
74-
Debug.Log("connect test start");
7576
_tcpSocket.Connect(new TCPSocketConnectOption()
7677
{
7778
address = "www.oooceanworld.com",
@@ -80,39 +81,32 @@ private void connect() {
8081
_connected = true;
8182
} else
8283
{
83-
Debug.Log("连接失败:tcp实例未初始化或已连接");
84+
Debug.LogError("连接失败:tcp实例未初始化或已连接");
8485
}
8586
}
8687

8788
private void write() {
8889
if (_tcpSocket != null && _connected)
8990
{
90-
Debug.Log("write string test start:");
91-
Debug.Log("test 1: " + _stringData1);
92-
_tcpSocket.Write(_stringData1);
93-
Debug.Log("test 2: " + _stringData2);
94-
_tcpSocket.Write(_stringData2);
91+
if (options[0] == "String")
92+
{
93+
Debug.Log("test 1: " + _stringData1);
94+
_tcpSocket.Write(_stringData1);
95+
Debug.Log("test 2: " + _stringData2);
96+
_tcpSocket.Write(_stringData2);
97+
}
98+
else
99+
{
100+
Debug.Log("test 1: " + _bufferData1);
101+
_tcpSocket.Write(_bufferData1);
102+
Debug.Log("test 2: " + _bufferData2);
103+
_tcpSocket.Write(_bufferData2);
104+
Debug.Log("test 3: " + _bufferData3);
105+
_tcpSocket.Write(_bufferData3);
106+
}
95107
} else
96108
{
97-
Debug.Log("发送失败:tcp实例未初始化或未连接");
98-
}
99-
100-
}
101-
102-
private void writeBuffer() {
103-
if (_tcpSocket != null && _connected)
104-
{
105-
Debug.Log("write buffer test start:");
106-
Debug.Log("test 1: " + _bufferData1);
107-
_tcpSocket.Write(_bufferData1);
108-
Debug.Log("test 2: " + _bufferData2);
109-
_tcpSocket.Write(_bufferData2);
110-
Debug.Log("test 3: " + _bufferData3);
111-
_tcpSocket.Write(_bufferData3);
112-
}
113-
else
114-
{
115-
Debug.Log("发送失败:tcp实例未初始化或未连接");
109+
Debug.LogError("发送失败:tcp实例未初始化或未连接");
116110
}
117111
}
118112
}

‎Demo/API_V2/Assets/API/Network/TCPSocket/TCPSocketSO.asset

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ MonoBehaviour:
1515
entryScriptTypeName: TCPSocket
1616
entryName: "TCP\u901A\u4FE1"
1717
entryAPI: "TCP \u901A\u4FE1\u76F8\u5173api"
18-
entryDescription: "\u9700\u8981\u586B\u5165ip\u548Cport"
19-
optionList: []
18+
entryDescription: "\u9700\u8981\u5148\u521B\u5EFA\u5B9E\u4F8B\u5E76\u5EFA\u7ACB\u8FDE\u63A5\u624D\u80FD\u53D1\u9001\u4FE1\u606F"
19+
optionList:
20+
- optionName: "\u53D1\u9001\u4FE1\u606F\u7C7B\u578B"
21+
availableOptions:
22+
- String
23+
- Buffer
2024
initialButtonText: "\u521B\u5EFAtcp\u5B9E\u4F8B"
2125
extraButtonList:
2226
- buttonText: "\u8FDE\u63A5"
23-
- buttonText: "\u53D1\u9001String"
24-
- buttonText: "\u53D1\u9001Buffer"
27+
- buttonText: "\u53D1\u9001"
2528
- buttonText: "\u5173\u95ED"
2629
initialResultList: []

‎Demo/API_V2/Assets/API/Network/UDPSocket/UDPSocket.cs

Lines changed: 105 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,130 @@
66
public class UDPSocket : Details
77
{
88
private WXUDPSocket _udpSocket;
9+
private bool _connected = false;
10+
11+
// 数据
12+
private string _stringData = "hello, how are you";
13+
private byte[] _bufferData = { 66, 117, 102, 102, 101, 114, 32, 68, 97, 116, 97, 32 };
914

1015
private void Start() {
1116
GameManager.Instance.detailsController.BindExtraButtonAction(0, connect);
12-
GameManager.Instance.detailsController.BindExtraButtonAction(1, close);
17+
GameManager.Instance.detailsController.BindExtraButtonAction(1, write);
18+
GameManager.Instance.detailsController.BindExtraButtonAction(2, send);
19+
GameManager.Instance.detailsController.BindExtraButtonAction(3, close);
1320
}
1421

1522
// 测试 API
1623
protected override void TestAPI(string[] args)
1724
{
18-
_udpSocket = WX.CreateUDPSocket();
19-
var port = _udpSocket.Bind();
25+
if(_udpSocket == null)
26+
{
27+
_udpSocket = WX.CreateUDPSocket();
28+
var port = _udpSocket.Bind();
2029

21-
Debug.Log("udpSocket: " + JsonUtility.ToJson(_udpSocket));
30+
Debug.Log("udpSocket: " + JsonUtility.ToJson(_udpSocket));
2231

23-
_udpSocket.OnListening((res) => {
24-
Debug.Log("onListening: " + JsonUtility.ToJson(res));
25-
});
32+
_udpSocket.OnListening((res) => {
33+
Debug.Log("onListening: " + JsonUtility.ToJson(res));
34+
});
2635

27-
_udpSocket.OnError((res) => {
28-
Debug.Log("onError: " + JsonUtility.ToJson(res));
29-
});
36+
_udpSocket.OnError((res) => {
37+
Debug.Log("onError: " + JsonUtility.ToJson(res));
38+
});
3039

31-
_udpSocket.OnClose((res) => {
32-
Debug.Log("onClose: " + JsonUtility.ToJson(res));
33-
});
40+
_udpSocket.OnClose((res) => {
41+
Debug.Log("onClose: " + JsonUtility.ToJson(res));
42+
});
3443

35-
_udpSocket.OnMessage((res) => {
36-
Debug.Log("onMessage: " + JsonUtility.ToJson(res));
37-
});
44+
_udpSocket.OnMessage((res) => {
45+
Debug.Log("onMessage: " + JsonUtility.ToJson(res));
46+
});
47+
}
48+
else
49+
{
50+
Debug.LogError("udp实例已初始化");
51+
}
3852
}
3953

4054
private void connect() {
41-
_udpSocket.Connect(new UDPSocketConnectOption() {
42-
address = "192.168.193.2",
43-
port = 8848
44-
});
55+
if (_udpSocket != null && !_connected)
56+
{
57+
_udpSocket.Connect(new UDPSocketConnectOption()
58+
{
59+
address = "www.oooceanworld.com",
60+
port = 8101
61+
});
62+
_connected = true;
63+
} else
64+
{
65+
Debug.LogError("连接失败:udp实例未初始化或已连接");
66+
}
67+
}
68+
69+
private void write()
70+
{
71+
if (_udpSocket != null && _connected)
72+
{
73+
Debug.LogError("接口有bug暂未修复 当前为placeholder");
74+
/*
75+
UDPSocketWriteOption option = new UDPSocketWriteOption()
76+
{
77+
address = "www.oooceanworld.com",
78+
port = 8101
79+
};
80+
if (options[0] == "String")
81+
{
82+
option.message = _stringData;
83+
}
84+
else
85+
{
86+
option.message = _bufferData;
87+
}
88+
_udpSocket.Write(option);
89+
*/
90+
}
91+
else
92+
{
93+
Debug.LogError("write失败:udp实例未初始化或未连接");
94+
}
95+
}
96+
97+
private void send()
98+
{
99+
if (_udpSocket != null)
100+
{
101+
UDPSocketSendOption option = new UDPSocketSendOption()
102+
{
103+
address = "www.oooceanworld.com",
104+
port = 8101
105+
};
106+
if (options[0] == "String")
107+
{
108+
option.message = _stringData;
109+
}
110+
else
111+
{
112+
option.message = _bufferData;
113+
}
114+
_udpSocket.Send(option);
115+
Debug.Log("Message: " + option.message);
116+
}
117+
else
118+
{
119+
Debug.LogError("send失败:udp实例未初始化");
120+
}
45121
}
46122

47123
private void close() {
48-
_udpSocket.Close();
124+
if (_udpSocket != null && _connected)
125+
{
126+
_udpSocket.Close();
127+
_connected = false;
128+
_udpSocket = null;
129+
} else
130+
{
131+
Debug.LogError("关闭失败:udp实例未初始化或未连接");
132+
}
49133
}
50134
}
51135

‎Demo/API_V2/Assets/API/Network/UDPSocket/UDPSocketSO.asset

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,18 @@ MonoBehaviour:
1515
entryScriptTypeName: UDPSocket
1616
entryName: "UDP\u901A\u4FE1"
1717
entryAPI: "UDP \u901A\u4FE1\u76F8\u5173api"
18-
entryDescription: "\u9700\u8981\u586B\u5165ip\u548Cport"
19-
optionList: []
18+
entryDescription: "write\u7528\u6CD5\u4E0E send \u65B9\u6CD5\u76F8\u540C\uFF0C\u5982\u679C\u6CA1\u6709\u9884\u5148\u8C03\u7528
19+
connect \u5219\u4E0E send \u65E0\u5DEE\u5F02\uFF08\u6CE8\u610F\u5373\u4F7F\u8C03\u7528\u4E86
20+
connect \u4E5F\u9700\u8981\u5728\u672C\u63A5\u53E3\u586B\u5165\u5730\u5740\u548C\u7AEF\u53E3\u53C2\u6570\uFF09"
21+
optionList:
22+
- optionName: "\u53D1\u9001\u4FE1\u606F\u7C7B\u578B"
23+
availableOptions:
24+
- String
25+
- Buffer
2026
initialButtonText: "\u521B\u5EFAudp\u5B9E\u4F8B"
2127
extraButtonList:
2228
- buttonText: "\u8FDE\u63A5"
29+
- buttonText: Write
30+
- buttonText: Send
2331
- buttonText: "\u5173\u95ED"
2432
initialResultList: []

‎Demo/API_V2/Assets/API/Network/UnityWebRequest.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!114 &11400000
4+
MonoBehaviour:
5+
m_ObjectHideFlags: 0
6+
m_CorrespondingSourceObject: {fileID: 0}
7+
m_PrefabInstance: {fileID: 0}
8+
m_PrefabAsset: {fileID: 0}
9+
m_GameObject: {fileID: 0}
10+
m_Enabled: 1
11+
m_EditorHideFlags: 0
12+
m_Script: {fileID: 11500000, guid: fb48e4613a53bb941a20036d7c08fefb, type: 3}
13+
m_Name: WebRequest SO
14+
m_EditorClassIdentifier:
15+
entryScriptTypeName: WebRequest
16+
entryName: "HTTP \u901A\u4FE1"
17+
entryAPI: UnityWebRequest
18+
entryDescription:
19+
optionList: []
20+
initialButtonText: Put
21+
extraButtonList:
22+
- buttonText: Post
23+
- buttonText: Get
24+
initialResultList: []

‎Demo/API_V2/Assets/API/Network/UnityWebRequest/WebRequest SO.asset.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using LitJson;
4+
using UnityEngine;
5+
using UnityEngine.Networking;
6+
using System.Collections;
7+
using WeChatWASM;
8+
9+
public class WebRequest : Details
10+
{
11+
// Start is called before the first frame update
12+
void Start()
13+
{
14+
GameManager.Instance.detailsController.BindExtraButtonAction(0, testPost);
15+
GameManager.Instance.detailsController.BindExtraButtonAction(1, testGet);
16+
}
17+
18+
// 测试API
19+
protected override void TestAPI(string[] args)
20+
{
21+
testPut();
22+
}
23+
24+
private void testGet()
25+
{
26+
StartCoroutine(Get());
27+
}
28+
29+
private void testPost()
30+
{
31+
StartCoroutine(Post());
32+
}
33+
34+
private void testPut()
35+
{
36+
StartCoroutine(Put());
37+
}
38+
39+
IEnumerator Get()
40+
{
41+
UnityWebRequest webRequest = UnityWebRequest.Get("https://postman-echo.com/get");
42+
43+
yield return webRequest.SendWebRequest();
44+
45+
if (webRequest.isHttpError || webRequest.isNetworkError)
46+
Debug.Log(webRequest.error);
47+
else
48+
{
49+
Debug.Log("get complete: " + webRequest.downloadHandler.text);
50+
}
51+
52+
}
53+
54+
IEnumerator Post()
55+
{
56+
WWWForm form = new WWWForm();
57+
//键值对
58+
form.AddField("key", "value");
59+
form.AddField("name", "mafanwei");
60+
form.AddField("blog", "qwe25878");
61+
62+
UnityWebRequest webRequest = UnityWebRequest.Post("https://postman-echo.com/post", form);
63+
64+
yield return webRequest.SendWebRequest();
65+
66+
if (webRequest.isHttpError || webRequest.isNetworkError)
67+
Debug.Log(webRequest.error);
68+
else
69+
{
70+
Debug.Log("post complete: " + webRequest.downloadHandler.text);
71+
}
72+
}
73+
74+
IEnumerator Put()
75+
{
76+
byte[] myData = System.Text.Encoding.UTF8.GetBytes("This is some test data");
77+
UnityWebRequest www = UnityWebRequest.Put("https://postman-echo.com/put", myData);
78+
yield return www.SendWebRequest();
79+
80+
if (www.result != UnityWebRequest.Result.Success)
81+
{
82+
Debug.Log(www.error);
83+
}
84+
else
85+
{
86+
Debug.Log("Put complete: " + www.downloadHandler.text);
87+
}
88+
}
89+
}

‎Demo/API_V2/Assets/API/Network/UnityWebRequest/WebRequest.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Demo/API_V2/Assets/API/Network/UnityWebSocket/WebSocketSO.asset renamed to ‎Demo/API_V2/Assets/API/UnityWebSocket/UnityWebSocketSO.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ MonoBehaviour:
1010
m_Enabled: 1
1111
m_EditorHideFlags: 0
1212
m_Script: {fileID: 11500000, guid: 77d040911b51640ea8a6e857528c3a0d, type: 3}
13-
m_Name: WebSocketSO
13+
m_Name: UnityWebSocketSO
1414
m_EditorClassIdentifier:
1515
abilityName: WebSocket
1616
abilitySprite: {fileID: 0}

‎Demo/API_V2/Assets/Scenes/PlayerPrefsScene.unity

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ RenderSettings:
3838
m_ReflectionIntensity: 1
3939
m_CustomReflection: {fileID: 0}
4040
m_Sun: {fileID: 0}
41-
m_IndirectSpecularColor: {r: 0.37311932, g: 0.38073996, b: 0.3587271, a: 1}
41+
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
4242
m_UseRadianceAmbientProbe: 0
4343
--- !u!157 &3
4444
LightmapSettings:
@@ -105,7 +105,7 @@ NavMeshSettings:
105105
serializedVersion: 2
106106
m_ObjectHideFlags: 0
107107
m_BuildSettings:
108-
serializedVersion: 2
108+
serializedVersion: 3
109109
agentTypeID: 0
110110
agentRadius: 0.5
111111
agentHeight: 2
@@ -118,7 +118,7 @@ NavMeshSettings:
118118
cellSize: 0.16666667
119119
manualTileSize: 0
120120
tileSize: 256
121-
accuratePlacement: 0
121+
buildHeightMesh: 0
122122
maxJobWorkers: 0
123123
preserveTilesOutsideBounds: 0
124124
debug:
@@ -165,7 +165,6 @@ RectTransform:
165165
- {fileID: 1762191145}
166166
- {fileID: 1553820868}
167167
m_Father: {fileID: 1377911773}
168-
m_RootOrder: 0
169168
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
170169
m_AnchorMin: {x: 0, y: 0}
171170
m_AnchorMax: {x: 1, y: 1}
@@ -254,7 +253,6 @@ RectTransform:
254253
- {fileID: 505356602}
255254
- {fileID: 2055780001}
256255
m_Father: {fileID: 287533383}
257-
m_RootOrder: 0
258256
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
259257
m_AnchorMin: {x: 0, y: 0}
260258
m_AnchorMax: {x: 0, y: 0}
@@ -353,7 +351,6 @@ RectTransform:
353351
m_Children:
354352
- {fileID: 1377911773}
355353
m_Father: {fileID: 287533383}
356-
m_RootOrder: 1
357354
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
358355
m_AnchorMin: {x: 0, y: 0}
359356
m_AnchorMax: {x: 0, y: 0}
@@ -480,7 +477,6 @@ RectTransform:
480477
m_ConstrainProportionsScale: 0
481478
m_Children: []
482479
m_Father: {fileID: 19015508}
483-
m_RootOrder: 6
484480
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
485481
m_AnchorMin: {x: 0, y: 0}
486482
m_AnchorMax: {x: 0, y: 0}
@@ -577,7 +573,6 @@ RectTransform:
577573
- {fileID: 34478918}
578574
- {fileID: 88306112}
579575
m_Father: {fileID: 1396553310}
580-
m_RootOrder: 1
581576
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
582577
m_AnchorMin: {x: 0, y: 0}
583578
m_AnchorMax: {x: 1, y: 1}
@@ -642,12 +637,11 @@ RectTransform:
642637
m_Children:
643638
- {fileID: 548615013}
644639
m_Father: {fileID: 19015508}
645-
m_RootOrder: 3
646640
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
647-
m_AnchorMin: {x: 0, y: 1}
648-
m_AnchorMax: {x: 0, y: 1}
649-
m_AnchoredPosition: {x: 539.86505, y: -178}
650-
m_SizeDelta: {x: 1020, y: 160}
641+
m_AnchorMin: {x: 0, y: 0}
642+
m_AnchorMax: {x: 0, y: 0}
643+
m_AnchoredPosition: {x: 0, y: 0}
644+
m_SizeDelta: {x: 0, y: 0}
651645
m_Pivot: {x: 0.5, y: 0.5}
652646
--- !u!114 &309197567
653647
MonoBehaviour:
@@ -687,7 +681,7 @@ MonoBehaviour:
687681
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
688682
m_Name:
689683
m_EditorClassIdentifier:
690-
m_IgnoreLayout: 1
684+
m_IgnoreLayout: 0
691685
m_MinWidth: -1
692686
m_MinHeight: 160
693687
m_PreferredWidth: -1
@@ -727,7 +721,6 @@ RectTransform:
727721
- {fileID: 1400629637}
728722
- {fileID: 1668469603}
729723
m_Father: {fileID: 19015508}
730-
m_RootOrder: 1
731724
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
732725
m_AnchorMin: {x: 0, y: 1}
733726
m_AnchorMax: {x: 0, y: 1}
@@ -786,7 +779,6 @@ RectTransform:
786779
m_ConstrainProportionsScale: 0
787780
m_Children: []
788781
m_Father: {fileID: 19015508}
789-
m_RootOrder: 0
790782
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
791783
m_AnchorMin: {x: 0, y: 0}
792784
m_AnchorMax: {x: 0, y: 0}
@@ -883,7 +875,6 @@ RectTransform:
883875
m_ConstrainProportionsScale: 0
884876
m_Children: []
885877
m_Father: {fileID: 34478918}
886-
m_RootOrder: 0
887878
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
888879
m_AnchorMin: {x: 0.5, y: 1}
889880
m_AnchorMax: {x: 0.5, y: 1}
@@ -977,7 +968,6 @@ RectTransform:
977968
m_ConstrainProportionsScale: 0
978969
m_Children: []
979970
m_Father: {fileID: 309197566}
980-
m_RootOrder: 0
981971
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
982972
m_AnchorMin: {x: 0, y: 0}
983973
m_AnchorMax: {x: 0, y: 0}
@@ -1089,7 +1079,6 @@ RectTransform:
10891079
m_ConstrainProportionsScale: 0
10901080
m_Children: []
10911081
m_Father: {fileID: 19015508}
1092-
m_RootOrder: 5
10931082
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
10941083
m_AnchorMin: {x: 0, y: 0}
10951084
m_AnchorMax: {x: 0, y: 0}
@@ -1262,19 +1251,20 @@ Transform:
12621251
m_PrefabInstance: {fileID: 0}
12631252
m_PrefabAsset: {fileID: 0}
12641253
m_GameObject: {fileID: 587693936}
1254+
serializedVersion: 2
12651255
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
12661256
m_LocalPosition: {x: 113.82237, y: 444.7848, z: -0.5173562}
12671257
m_LocalScale: {x: 1, y: 1, z: 1}
12681258
m_ConstrainProportionsScale: 0
12691259
m_Children: []
12701260
m_Father: {fileID: 0}
1271-
m_RootOrder: 1
12721261
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
12731262
--- !u!1001 &763119797
12741263
PrefabInstance:
12751264
m_ObjectHideFlags: 0
12761265
serializedVersion: 2
12771266
m_Modification:
1267+
serializedVersion: 3
12781268
m_TransformParent: {fileID: 1762191145}
12791269
m_Modifications:
12801270
- target: {fileID: 8396944020726690284, guid: c913bcba93a277649acf924959bfbce8,
@@ -1423,6 +1413,9 @@ PrefabInstance:
14231413
value: UnityEngine.Object, UnityEngine
14241414
objectReference: {fileID: 0}
14251415
m_RemovedComponents: []
1416+
m_RemovedGameObjects: []
1417+
m_AddedGameObjects: []
1418+
m_AddedComponents: []
14261419
m_SourcePrefab: {fileID: 100100000, guid: c913bcba93a277649acf924959bfbce8, type: 3}
14271420
--- !u!224 &763119798 stripped
14281421
RectTransform:
@@ -1461,7 +1454,6 @@ RectTransform:
14611454
m_ConstrainProportionsScale: 0
14621455
m_Children: []
14631456
m_Father: {fileID: 2055780001}
1464-
m_RootOrder: 0
14651457
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
14661458
m_AnchorMin: {x: 0, y: 1}
14671459
m_AnchorMax: {x: 0, y: 1}
@@ -1537,7 +1529,6 @@ RectTransform:
15371529
m_ConstrainProportionsScale: 0
15381530
m_Children: []
15391531
m_Father: {fileID: 1396553310}
1540-
m_RootOrder: 0
15411532
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
15421533
m_AnchorMin: {x: 0, y: 0}
15431534
m_AnchorMax: {x: 1, y: 1}
@@ -1622,9 +1613,17 @@ Camera:
16221613
m_projectionMatrixMode: 1
16231614
m_GateFitMode: 2
16241615
m_FOVAxisMode: 0
1616+
m_Iso: 200
1617+
m_ShutterSpeed: 0.005
1618+
m_Aperture: 16
1619+
m_FocusDistance: 10
1620+
m_FocalLength: 50
1621+
m_BladeCount: 5
1622+
m_Curvature: {x: 2, y: 11}
1623+
m_BarrelClipping: 0.25
1624+
m_Anamorphism: 0
16251625
m_SensorSize: {x: 36, y: 24}
16261626
m_LensShift: {x: 0, y: 0}
1627-
m_FocalLength: 50
16281627
m_NormalizedViewPortRect:
16291628
serializedVersion: 2
16301629
x: 0
@@ -1658,13 +1657,13 @@ Transform:
16581657
m_PrefabInstance: {fileID: 0}
16591658
m_PrefabAsset: {fileID: 0}
16601659
m_GameObject: {fileID: 1159140099}
1660+
serializedVersion: 2
16611661
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
16621662
m_LocalPosition: {x: 0, y: 1, z: -10}
16631663
m_LocalScale: {x: 1, y: 1, z: 1}
16641664
m_ConstrainProportionsScale: 0
16651665
m_Children: []
16661666
m_Father: {fileID: 0}
1667-
m_RootOrder: 0
16681667
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
16691668
--- !u!1 &1242671060
16701669
GameObject:
@@ -1698,7 +1697,6 @@ RectTransform:
16981697
m_ConstrainProportionsScale: 0
16991698
m_Children: []
17001699
m_Father: {fileID: 19015508}
1701-
m_RootOrder: 2
17021700
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
17031701
m_AnchorMin: {x: 0, y: 0}
17041702
m_AnchorMax: {x: 0, y: 0}
@@ -1796,7 +1794,6 @@ RectTransform:
17961794
m_Children:
17971795
- {fileID: 19015508}
17981796
m_Father: {fileID: 88306112}
1799-
m_RootOrder: 0
18001797
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
18011798
m_AnchorMin: {x: 0, y: 0}
18021799
m_AnchorMax: {x: 1, y: 1}
@@ -1945,6 +1942,7 @@ Canvas:
19451942
m_SortingBucketNormalizedSize: 0
19461943
m_VertexColorAlwaysGammaSpace: 0
19471944
m_AdditionalShaderChannelsFlag: 0
1945+
m_UpdateRectTransformForStandalone: 0
19481946
m_SortingLayerID: 0
19491947
m_SortingOrder: 0
19501948
m_TargetDisplay: 0
@@ -1963,7 +1961,6 @@ RectTransform:
19631961
- {fileID: 980365817}
19641962
- {fileID: 287533383}
19651963
m_Father: {fileID: 0}
1966-
m_RootOrder: 2
19671964
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
19681965
m_AnchorMin: {x: 0, y: 0}
19691966
m_AnchorMax: {x: 0, y: 0}
@@ -2002,7 +1999,6 @@ RectTransform:
20021999
m_ConstrainProportionsScale: 0
20032000
m_Children: []
20042001
m_Father: {fileID: 321225463}
2005-
m_RootOrder: 0
20062002
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
20072003
m_AnchorMin: {x: 0, y: 0}
20082004
m_AnchorMax: {x: 1, y: 1}
@@ -2123,13 +2119,13 @@ Transform:
21232119
m_PrefabInstance: {fileID: 0}
21242120
m_PrefabAsset: {fileID: 0}
21252121
m_GameObject: {fileID: 1448331931}
2122+
serializedVersion: 2
21262123
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
21272124
m_LocalPosition: {x: 0, y: 0, z: 0}
21282125
m_LocalScale: {x: 1, y: 1, z: 1}
21292126
m_ConstrainProportionsScale: 0
21302127
m_Children: []
21312128
m_Father: {fileID: 0}
2132-
m_RootOrder: 3
21332129
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
21342130
--- !u!1 &1553820867
21352131
GameObject:
@@ -2162,7 +2158,6 @@ RectTransform:
21622158
m_ConstrainProportionsScale: 0
21632159
m_Children: []
21642160
m_Father: {fileID: 19015508}
2165-
m_RootOrder: 8
21662161
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
21672162
m_AnchorMin: {x: 0, y: 0}
21682163
m_AnchorMax: {x: 0, y: 0}
@@ -2246,7 +2241,6 @@ RectTransform:
22462241
m_ConstrainProportionsScale: 0
22472242
m_Children: []
22482243
m_Father: {fileID: 321225463}
2249-
m_RootOrder: 1
22502244
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
22512245
m_AnchorMin: {x: 0, y: 0}
22522246
m_AnchorMax: {x: 1, y: 1}
@@ -2323,7 +2317,6 @@ RectTransform:
23232317
m_Children:
23242318
- {fileID: 763119798}
23252319
m_Father: {fileID: 19015508}
2326-
m_RootOrder: 7
23272320
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
23282321
m_AnchorMin: {x: 0, y: 0}
23292322
m_AnchorMax: {x: 0, y: 0}
@@ -2408,7 +2401,6 @@ RectTransform:
24082401
m_ConstrainProportionsScale: 0
24092402
m_Children: []
24102403
m_Father: {fileID: 19015508}
2411-
m_RootOrder: 4
24122404
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
24132405
m_AnchorMin: {x: 0, y: 0}
24142406
m_AnchorMax: {x: 0, y: 0}
@@ -2507,7 +2499,6 @@ RectTransform:
25072499
m_Children:
25082500
- {fileID: 796889229}
25092501
m_Father: {fileID: 34478918}
2510-
m_RootOrder: 1
25112502
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
25122503
m_AnchorMin: {x: 0, y: 0.5}
25132504
m_AnchorMax: {x: 0, y: 0.5}
@@ -2608,3 +2599,11 @@ CanvasRenderer:
26082599
m_PrefabAsset: {fileID: 0}
26092600
m_GameObject: {fileID: 2055780000}
26102601
m_CullTransparentMesh: 0
2602+
--- !u!1660057539 &9223372036854775807
2603+
SceneRoots:
2604+
m_ObjectHideFlags: 0
2605+
m_Roots:
2606+
- {fileID: 1159140102}
2607+
- {fileID: 587693938}
2608+
- {fileID: 1396553310}
2609+
- {fileID: 1448331934}

‎Demo/API_V2/Assets/Scenes/WebSocketSceneSettings.lighting renamed to ‎Demo/API_V2/Assets/Scenes/UnityWebSocketSceneSettings.lighting

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LightingSettings:
66
m_CorrespondingSourceObject: {fileID: 0}
77
m_PrefabInstance: {fileID: 0}
88
m_PrefabAsset: {fileID: 0}
9-
m_Name: WebSocketSceneSettings
9+
m_Name: UnityWebSocketSceneSettings
1010
serializedVersion: 4
1111
m_GIWorkflowMode: 1
1212
m_EnableBakedLightmaps: 1

‎Demo/API_V2/Assets/WX-WASM-SDK-V2/Editor/MiniGameConfig.asset

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ MonoBehaviour:
1313
m_Name: MiniGameConfig
1414
m_EditorClassIdentifier:
1515
ProjectConf:
16-
projectName: GameClubDemo
16+
projectName: NetworkDemo
1717
Appid: wxb7d4485dbc1233ca
18-
CDN:
19-
assetLoadType: 1
18+
CDN: http://127.0.0.1:8080
19+
assetLoadType: 0
2020
compressDataPackage: 0
2121
VideoUrl:
22-
DST: C:/Users/xiaoyuejin/Desktop/finaltest
22+
DST: C:/Users/xiaoyuejin/Desktop/Network
2323
StreamCDN:
2424
bundleHashLength: 32
2525
bundlePathIdentifier: StreamingAssets;

0 commit comments

Comments
 (0)
Please sign in to comment.