Call and Render a Screenshot at Runtime,How do i render a sprite that was created at runtime (Screen Cap Question)

Im trying to setup a screen Capture and display captured image on the UI, but i don’t know how to display the sprite that i have captured that is stored in the asset folder.

If the screencapture that i created was is stored in my asset folder as a
Texture 2D & UI (at runtime)

how do i call ‘this’ sprite and display it on the UI?,Im trying to setup a screen Capture and display captured image on the UI, but i don’t know how to display the sprite that i have created and stored in the asset folder.

If the screencapture that i created was is stored in my asset folder as a
Texture 2D & UI (at runtime)

how do i call it and render it onto my UI?

If you already have a reference to the Texture2D from your project that was made at runtime, then all you should have to do is create a sprite from that object using Sprite.Create and apply it as the sprite for the image component you wish to place the render to.

Take a look at this script for your reference, if you want to see it running add this component to an object in your scene, add an image somewhere in your UI to display the screen capture to and link it with the outputImage field in the inspector. At runtime press the Space key to see the output written in your image component.

namespace PlayNice.UnityHelp
{
	public class ScreenShotHelper : MonoBehaviour 
	{
		public Image outputImage;
		bool isCapturing = false;
		Texture2D currentCapture;

		IEnumerator CaptureRoutine()
		{
			yield return new WaitForEndOfFrame();
			try
			{
				isCapturing = true;
				currentCapture = new Texture2D (Screen.width, Screen.height, TextureFormat.RGB24, false);
				currentCapture.ReadPixels (new Rect (0, 0, Screen.width, Screen.height), 0, 0, false);
				currentCapture.Apply ();
			} 
			catch (System.Exception e)
			{
				Debug.LogError ("Screen capture failed!");
				Debug.LogError (e.ToString ());
				isCapturing = false;
			}
		}

		void LateUpdate()
		{
			if (Input.GetKeyDown (KeyCode.Space))
			{
				ScreenshotToImage ();
			}

			if (isCapturing && currentCapture != null)
			{
				Sprite sprite = Sprite.Create(currentCapture, new Rect(0, 0, Screen.width, Screen.height), new Vector2(0, 0));
				if(outputImage)
					outputImage.sprite = sprite;
				isCapturing = false;
			}
		}

		public void ScreenshotToImage()
		{
			StartCoroutine (CaptureRoutine ());
		}
	}
}

@hollums
Oh mang!!! this works like a charm. Thank you so much, i tried so many different but this is exactly what i need to play around with my system

Thanks!!!