app名称本地化自适应;分享图片接入

This commit is contained in:
Caiyanpeng committed 2021-12-10 18:10:20 +08:00
1 parent cbd1ce3313
commit 625e2b7934
66 files changed
+7772 -342

No files matched your search

+11
View File
@@ -27,6 +27,9 @@ public class WeChatController
[DllImport("__Internal")]
private static extern bool checkLocation();
[DllImport("__Internal")]
private static extern void ShareImgToWX(int scene, byte[] msgByteArrayData, int arrayLength);
#endif
#endregion
/// <summary>
@@ -128,6 +131,14 @@ public class WeChatController
{
mainActivityClass.CallStatic("ShareImageToWX", scene, ImageToBytes(image));
}
public void ShareImageToWX(int scene, byte[] image)
{
#if UNITY_ANDROID
mainActivityClass.CallStatic("ShareImageToWX", scene, image);
#elif UNITY_IOS
ShareImgToWX(scene,image,image.Length);
#endif
}
/// <summary>
/// 分享音乐至微信