hey, [mention|picCbCEMc7n/pAAnjofO4g==] thanks for instant reply and suggestion. i am using NativeGallery.SaveImageToGallery like this with native camera script but… getting the following error in android console.
ArgumentException: Texture ‘’ is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.
at (wrapper managed-to-native) UnityEngine.ImageConversion.EncodeToPNG(UnityEngine.Texture2D)
at NativeGallery.GetTextureBytes (UnityEngine.Texture2D texture, System.Boolean isJpeg) [0x00002] in D:\Unity pro\Puzzle Game\Assets\Plugins\NativeGallery\NativeGallery.cs:452
at NativeGallery.SaveImageToGallery (UnityEngine.Texture2D image, System.String album, System.String filenameFormatted, NativeGallery+MediaSaveCallback callback) [0x00058] in D:\Unity pro\Puzzle Game\Assets\Plugins\NativeGallery\NativeGallery.cs:234
with this code :-
private void TakePicture(int maxSize)
{
NativeCamera.Permission permission = NativeCamera.TakePicture((path) =>
{
Debug.Log("Image path: " + path);
if (path != null)
{
Texture2D texture = NativeCamera.LoadImageAtPath(path, maxSize);
NativeGallery.SaveImageToGallery(texture, "GalleryTest", "My img {0}.png");
}
}, maxSize);
Debug.Log("Permission result: " + permission);
}