Skip to content

Commit 4de8cde

Browse files
committed
v2.3.0_20190924_2
Updated NatShare version to 1.2.0.
1 parent 752b98d commit 4de8cde

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

Assets/NatCamWithOpenCVForUnityExample/IntegrationWithNatShareExample/IntegrationWithNatShareExample.cs

+19-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using NatShareU;
1+
using NatShare;
22
using OpenCVForUnity.CoreModule;
33
using OpenCVForUnity.ImgprocModule;
44
using OpenCVForUnity.UnityUtils;
@@ -143,16 +143,29 @@ protected override void OnDestroy()
143143

144144
public void OnShareButtonClick()
145145
{
146-
NatShare.Share(texture,
147-
() =>
146+
using (var payload = new SharePayload("NatCamWithOpenCVForUnityExample",
147+
completionHandler: () =>
148148
{
149-
Debug.Log("sharing is complete.");
150-
});
149+
Debug.Log("User shared image!");
150+
}
151+
))
152+
{
153+
payload.AddText("User shared image!");
154+
payload.AddImage(texture);
155+
}
151156
}
152157

153158
public void OnSaveToCameraRollButtonClick()
154159
{
155-
NatShare.SaveToCameraRoll(texture, "NatCamWithOpenCVForUnityExample");
160+
using (var payload = new SavePayload("NatCamWithOpenCVForUnityExample",
161+
completionHandler: () =>
162+
{
163+
Debug.Log("User saved image to camera roll!");
164+
}
165+
))
166+
{
167+
payload.AddImage(texture);
168+
}
156169
}
157170
}
158171
}

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
## Environment
1414
- Anddroid (Pixel, Nexus 7) / iOS (iPhone8, iPhone6s)
15-
- Unity >= 2017.1+
15+
- Unity >= 2018.3+
1616
- Scripting backend MONO / IL2CPP
1717
- [NatCam - WebCam API](https://assetstore.unity.com/packages/tools/integration/natcam-pro-webcam-api-52154?aid=1011l4ehR) 2.3.0+
18-
- [NatShare - Mobile Sharing API](https://assetstore.unity.com/packages/tools/integration/natshare-mobile-sharing-api-117705?aid=1011l4ehR) 1.1f3+
18+
- [NatShare - Mobile Sharing API](https://assetstore.unity.com/packages/tools/integration/natshare-mobile-sharing-api-117705?aid=1011l4ehR) 1.2.0+
1919
- [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.3.7+
2020

2121

@@ -31,7 +31,7 @@
3131
1. Import OpenCVForUnity.
3232
* Setup the OpenCVForUnity. (Tools > OpenCV for Unity > Set Plugin Import Settings)
3333
1. Import the NatCamWithOpenCVForUnityExample.unitypackage.
34-
1. Change the "Minimum API Level" to 21 or higher in the "Player Settings (Androd)" Inspector.
34+
1. Change the "Minimum API Level" to 22 or higher in the "Player Settings (Androd)" Inspector.
3535
1. Change the "Target minimum iOS Version" to 11 or higher in the "Player Settings (iOS)" Inspector.
3636
1. Add the "Assets/NatCamWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
3737
1. Build and Deploy to Android and iOS.

0 commit comments

Comments
 (0)