I use the Native share plugine screenshots code not working in android,
I use the native share link sharing its working good but for screenshot its not working, and I new to in C#, Plz help me out, In following I wrote down my code which i made from https://github.com/yasirkula/UnityNativeShare.
public void Nativshare2()
{
StartCoroutine( TakeSSAndShare() );
Debug.LogError ("button works");
}
private IEnumerator TakeSSAndShare()
{
yield return new WaitForEndOfFrame();
Texture2D ss = new Texture2D( Screen.width, Screen.height, TextureFormat.RGB24, false );
ss.ReadPixels( new Rect( 0, 0, Screen.width, Screen.height ), 0, 0 );
ss.Apply();
string filePath = Path.Combine( Application.temporaryCachePath, "shared img.png" );
File.WriteAllBytes( filePath, ss.EncodeToPNG() );
// To avoid memory leaks
//Destroy( ss );
new NativeShare().AddFile( filePath ).SetSubject( "Subject goes here" ).SetText( "Hello world!" ).Share();
Debug.Log ("Share is Over");
}
I use the Native share plugine screenshots code not working in android, I use the native share link sharing its working good but for screenshot its not working, and I new to in C#, Plz help me out, In following I wrote down my code which i made from https://github.com/yasirkula/UnityNativeShare.
public void Nativshare2() {