File tree 4 files changed +13
-17
lines changed
4 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ private void Start()
20
20
// 测试 API
21
21
protected override void TestAPI ( string [ ] args )
22
22
{
23
- _log . Info ( "info msg" ) ;
23
+ _log . Info ( new [ ] { "info msg" } ) ;
24
24
}
25
25
26
26
private void error ( )
27
27
{
28
- _log . Error ( "error msg" ) ;
28
+ _log . Error ( new [ ] { "error msg" } ) ;
29
29
}
30
30
31
31
private void warn ( )
32
32
{
33
- _log . Warn ( "warn msg" ) ;
33
+ _log . Warn ( new [ ] { "warn msg" } ) ;
34
34
}
35
35
}
Original file line number Diff line number Diff line change 4
4
using UnityEngine ;
5
5
using WeChatWASM ;
6
6
7
- // 定义自定义数据类型,类型要跟自定义属性中定义的类型一致
8
- [ System . Serializable ]
9
- public class EventData
10
- {
11
- public string data1 ;
12
- public int data2 ;
13
- }
14
-
15
7
public class ReportEvent : Details
16
8
{
17
9
// 测试 API
18
10
protected override void TestAPI ( string [ ] args )
19
11
{
20
- Report ( args [ 0 ] , args [ 1 ] ) ;
12
+ Report ( args [ 0 ] , int . Parse ( args [ 1 ] ) ) ;
21
13
}
22
14
23
15
// 事件上报
24
- private void Report ( string stringdata , string intdata )
16
+ private void Report ( string stringData , int intData )
25
17
{
26
- EventData eventData = new EventData { data1 = stringdata , data2 = int . Parse ( intdata ) } ;
18
+ var eventData = new Dictionary < string , string >
19
+ {
20
+ { "stringData" , stringData } ,
21
+ { "intData" , intData . ToString ( ) }
22
+ } ;
27
23
28
24
WX . ReportEvent ( "test" , eventData ) ;
29
25
Original file line number Diff line number Diff line change 1
1
{
2
2
"dependencies" : {
3
- "com.qq.weixin.minigame" : " https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git" ,
3
+ "com.qq.weixin.minigame" : " https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git#pre-v0.1.26 " ,
4
4
"com.unity.2d.sprite" : " 1.0.0" ,
5
5
"com.unity.2d.tilemap" : " 1.0.0" ,
6
6
"com.unity.ads" : " 4.4.2" ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"dependencies" : {
3
3
"com.qq.weixin.minigame" : {
4
- "version" : " https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git" ,
4
+ "version" : " https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git#pre-v0.1.26 " ,
5
5
"depth" : 0 ,
6
6
"source" : " git" ,
7
7
"dependencies" : {},
8
- "hash" : " 65b7e866110df9c6fb2a9d6ee7ff5a57c6d77924 "
8
+ "hash" : " 62ca5470bacc6635183b579100d5737045b08ad7 "
9
9
},
10
10
"com.unity.2d.sprite" : {
11
11
"version" : " 1.0.0" ,
You can’t perform that action at this time.
0 commit comments