Closed oleyb closed 5 years ago
Is your Texture2D a readable texture? Can you share a screenshot of the sharing options provided by iOS?
I capture the screenshot with the following code:
` Texture2D screenshot = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false); screenshot.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0, false); screenshot.Apply();
NatShare.Share(screenshot, () => {
isCapturing = false;
Destroy(screenshot);
});
`
I found that "SaveToCameraRoll(screenshot)" isn't working for me either, but if I share to a messaging or image editing app, it delivers the image properly.
For options to share I get: Copy, Assign to Contact, Print, Save to Files, Create Watch Face, and More. Under "More" there are two unchecked "Import to VSCO" and "Save to Dropbox" but no "Save Image". I used to have the save image asset in previous builds, but not sure where it went... It's likely that it's something dumb I'm doing. I can't test the build at the moment, but maybe it's the Destroy call in the callback?
I'll look into this. Your code looks good.
When trying on another iOS device, the "Save Image" button is the first option. I wonder why it's not there at all on my first device?
If this is device-specific, then it isn't a bug in NatShare itself. That said, what iOS versions are the original and new test devices running?
When sharing a Texture2D image on an iPhone 7 plus running the latest iOS 12.1.4 , the option on the share menu to "Save Image" is no longer available. The only option to save the image is "Save to Files" which does not add to the camera roll.