Author Topic: Screen Capture  (Read 5998 times)

SketchWork

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 44
    • View Profile
Screen Capture
« on: September 14, 2012, 09:25:08 AM »
Hi there,

Is it possible to capture a screenshot from a camera and store it directly into a UITexture or UIAtlas?  So there is no files involved just a pixel copy to the texture or atlas.  This way it can work on most devices?

Thanks for your time,

Justin

PhilipC

  • Guest
Re: Screen Capture
« Reply #1 on: September 14, 2012, 11:57:25 AM »
You'd have to use a RenderTexture and then assign that texture to a UITexture.texture (although if i'm not mistaken RenderTexture is a Unity Pro feature).

Capturing a screen shot is as simple as creating a camera that can visibly see what you want it to and assigning a renderTexture to that camera. Now that will constantly be taking "screen shots". If you want to control when the screen shot happens disable the camera and then on a button press (or what ever other event you want) do a myCamera.Render(). This will render that camera once.

If you need more clarity just ask.