yasirkula / UnityNativeShare

A Unity plugin to natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS
MIT License
891 stars 131 forks source link

iOS Screenshot Issue #20

Closed Ahamid17 closed 6 years ago

Ahamid17 commented 6 years ago

sharing works fine on ios but the screen that it takes has messed up colors the screenshot has like purplish tint?. Any Idea why?

yasirkula commented 6 years ago

Are you taking the screenshot in a coroutine with a yield return new WaitForEndOfFrame(); statement?

Ahamid17 commented 6 years ago

No I am not I am directly calling your function? do I have to do it in coroutine?

Ahamid17 commented 6 years ago

img_5027 This is a Sample shot

yasirkula commented 6 years ago

If you are calling StartCoroutine( TakeSSAndShare() ), then you should be good to go. Just make sure that there is a yield return new WaitForEndOfFrame(); call before the Texture2D.Apply function.

Inside the screenshot function, can you assign the texture to a RawImage just to see if the screenshot is captured correctly? Make sure to comment out Destroy( ss );, if exists.

Ahamid17 commented 6 years ago

it still wont work any idea why?

yasirkula commented 6 years ago

Does the screenshot look fine when assigned to a RawImage? Or does it look purple tinted there, as well?

Ahamid17 commented 6 years ago

Same result on Raw Image :|

Ahamid17 commented 6 years ago

the screenshot is fine on Android and Unity Editor but not on iOS for some reason

yasirkula commented 6 years ago

Some post processing effect(s) might be affecting the screenshot, I'm unsure. But this issue is apparently not related to NativeShare; so I'd suggest you to post to Unity forums about this issue.