Просто примените его к RawImage текстуре компонента
public RawImage _rawImage;
IEnumerator CaptureScreenShot()
{
yield return new WaitForEndOfFrame();
Texture2D texture = ScreenCapture.CaptureScreenshotAsTexture();
_rawImage.texture = texture;
}
Если вам нужно как Sprite
для применения к Image
или Material
Вы также можете использовать Sprite. Создать как
Sprite mySprite = Sprite.Create(
texture,
new Rect(0.0f, 0.0f, texture.width, texture.height),
new Vector2(0.5f, 0.5f),
100.0f
);