I want to take screen shot within gameplay in mobile and then share it.
I have done this with CaptureScreenShot but it captures complete screen, i want only specific area i.e smaller panel only that comes after game to show score.
Plz help me out.
I want to take screen shot within gameplay in mobile and then share it.
I have done this with CaptureScreenShot but it captures complete screen, i want only specific area i.e smaller panel only that comes after game to show score.
Plz help me out.
You can render whatever you need into a rendertexture ReadPixels on that rendertexture and write that into a Texture2D and then call EncodeToPNG() on that texture.
I have gone through this one as it captures whole screen and i have used it. But I am using Unity Canvas system and camera wont let me select specific part of scene, this is the issue.
You can use Texture2D.ReadPixels to grab s specified area of the screen (including the UI)
It is confusing me, can’t understand what should be pas in rect in ReadPixel.
I have a Panel in UI, and this panel there are UI.Text elements on screen center, i want to capture that area only.
i could not figure it out. #STUCK
Can u plz share the code with me,