Skip to content

Commit 216ea52

Browse files
committed
功能提交
1 parent c9d3173 commit 216ea52

File tree

8 files changed

+484
-5
lines changed

8 files changed

+484
-5
lines changed

Demo/API_V2/Assets/API/APISO.asset

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ MonoBehaviour:
1919
- {fileID: 11400000, guid: 9977a581037b84833a32b508e00eb1a2, type: 2}
2020
- {fileID: 11400000, guid: 56f316e0e10ba419bbf19bd7a68bfc4c, type: 2}
2121
- {fileID: 11400000, guid: 6f0972f5fdc56c543b23c9873d760bf5, type: 2}
22-
- {fileID: 11400000, guid: a461b8cd70d9e4e23ad1cc953bec31e9, type: 2}
2322
- {fileID: 11400000, guid: 7ef06699cee7846b7823e4cc421418eb, type: 2}
23+
- {fileID: 11400000, guid: a461b8cd70d9e4e23ad1cc953bec31e9, type: 2}
2424
- {fileID: 11400000, guid: 55de20d536f8c4689bbd80553d87fe46, type: 2}
2525
- {fileID: 11400000, guid: f2c56d751bb7c4c398db7c1db352517d, type: 2}
2626
- {fileID: 11400000, guid: b4a6196f623dd4435a4f3bd70af92d06, type: 2}

Demo/API_V2/Assets/API/Facility/FacilitySO.asset

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ MonoBehaviour:
1515
categoryName: "\u8BBE\u5907"
1616
categorySprite: {fileID: 21300000, guid: 53dd2b1922e5142ec8a53037f362fc56, type: 3}
1717
entryList:
18-
- {fileID: 11400000, guid: bbbc9b983d6d34ad3bac2921509f612f, type: 2}
19-
- {fileID: 11400000, guid: c17ae0ce755f04419b700825b20fd386, type: 2}
2018
- {fileID: 11400000, guid: a24af43ae51914d26b0bf637c283dab2, type: 2}
2119
- {fileID: 11400000, guid: 4eba2c9f2f2064e4081be74302ca4c33, type: 2}
20+
- {fileID: 11400000, guid: bbbc9b983d6d34ad3bac2921509f612f, type: 2}
21+
- {fileID: 11400000, guid: c17ae0ce755f04419b700825b20fd386, type: 2}
2222
- {fileID: 11400000, guid: ac09abff5d8bc48bbabd08bde820b58b, type: 2}
2323
- {fileID: 11400000, guid: 3bf339b994c544db3860ddf0a0dc8e20, type: 2}
2424
- {fileID: 11400000, guid: e92d94924be504167a342e42e1162f21, type: 2}

Demo/API_V2/Assets/API/Facility/Screen/ScreenSO.asset

+1
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ MonoBehaviour:
2626
- buttonText: "\u67E5\u8BE2\u7528\u6237\u662F\u5426\u5728\u5F55\u5C4F"
2727
- buttonText: "\u83B7\u53D6\u5C4F\u5E55\u4EAE\u5EA6"
2828
initialResultList: []
29+
entryOrder: 0

Demo/API_V2/Assets/API/FileSystem/FileSystemSO.asset

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ MonoBehaviour:
2424
- {fileID: 11400000, guid: 65ab1b01a722b4542a14fcf9decca3de, type: 2}
2525
- {fileID: 11400000, guid: 19b80cb144f0c4ea28a4ddca7a2c2f09, type: 2}
2626
- {fileID: 11400000, guid: 0aa5d76237c844275add1612c47bddaa, type: 2}
27-
- {fileID: 11400000, guid: 73c05fc1ffae94ec1b69a00ee261d529, type: 2}
2827
- {fileID: 11400000, guid: 65a826f5f949544d8990e673231bb80f, type: 2}
28+
- {fileID: 11400000, guid: 73c05fc1ffae94ec1b69a00ee261d529, type: 2}
2929
- {fileID: 11400000, guid: 3a901e80b59ad4aafbe373ee6a8df2d8, type: 2}
3030
- {fileID: 11400000, guid: e7ea0be62dc6543b0a8dc629489c5e7e, type: 2}
3131
categoryOrder: 11

Demo/API_V2/Assets/API/Render/RenderSO.asset

+1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ MonoBehaviour:
1717
entryList:
1818
- {fileID: 11400000, guid: 3742edf3f50854504ba8632134064e94, type: 2}
1919
- {fileID: 11400000, guid: c185ac653050d49608ea734a26e8dbaa, type: 2}
20+
- {fileID: 11400000, guid: f9a70ffa3b7f4db40b550f6b153c4ed2, type: 2}
2021
categoryOrder: 8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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: ToTempFilePath
14+
m_EditorClassIdentifier:
15+
entryScriptTypeName: ToTempFilePath
16+
entryName: ToTempFilePath
17+
entryAPI: Canvas.toTempFilePath
18+
entryDescription: Canvas.toTempFilePath
19+
optionList: []
20+
initialButtonText: "\u8FD0\u884C\u622A\u56FE"
21+
extraButtonList: []
22+
initialResultList: []
23+
entryOrder: 0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using WeChatWASM;
5+
6+
public class ToTempFilePath : Details
7+
{
8+
protected override void TestAPI(string[] args)
9+
{
10+
LoadCanvasToTempFilePath();
11+
}
12+
13+
private void LoadCanvasToTempFilePath()
14+
{
15+
var sys = WX.GetSystemInfoSync();
16+
Debug.Log("screenWidth:" + sys.screenWidth);
17+
Debug.Log("screenHeight:" + sys.screenHeight);
18+
Debug.Log("windowWidth:" + sys.windowWidth);
19+
Debug.Log("windowHeight:" + sys.windowHeight);
20+
21+
Debug.Log("UnityEngine.Screen.width;" + UnityEngine.Screen.width);
22+
Debug.Log("UnityEngine.Screen.height;" + UnityEngine.Screen.height);
23+
24+
int ShareHeight = UnityEngine.Screen.height / 3;
25+
WXCanvas.ToTempFilePath(new WXToTempFilePathParam()
26+
{
27+
x = (UnityEngine.Screen.width - ShareHeight) / 2,
28+
y = ShareHeight,
29+
width = ShareHeight,
30+
height = ShareHeight,
31+
destWidth = ShareHeight,
32+
destHeight = ShareHeight,
33+
success = (result) =>
34+
{
35+
Debug.Log("ToTempFilePath success" + JsonUtility.ToJson(result));
36+
WX.ShareAppMessage(new ShareAppMessageOption()
37+
{
38+
title = "这是你的标题",
39+
imageUrl = result.tempFilePath,
40+
});
41+
},
42+
fail = (result) =>
43+
{
44+
Debug.Log("ToTempFilePath fail" + JsonUtility.ToJson(result));
45+
},
46+
complete = (result) =>
47+
{
48+
Debug.Log("ToTempFilePath complete" + JsonUtility.ToJson(result));
49+
},
50+
});
51+
}
52+
}

0 commit comments

Comments
 (0)