Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Exporint screen shots

Discussion in 'Scripting' started by mediamacros, Dec 14, 2006.

  1. mediamacros


    Dec 14, 2006
    Working on my first Unity project and I am a bit stuck. I am setting up a configuration tool to allow clients to customize a product. When they are done I need to export out an image of their setup. Is there any built in feature, or a way to get the image data and pass it to a .net component to export out a JPG?

  2. hsparra


    Jul 12, 2005
    Its not very elegant, but you could try using Application.CaptureScreenshot to write a png to a file, then turn around and read that file in and convert it to a jpg. Check out the Image class in System.Drawing for the reading in and converting. I don't know if you can have the Application.CaptureScreenshot write to an in-memory data area or not.

    Note: I do not thing Application.CaptureScreenshot works if you are using a web player.

    Another approach, if you had Pro, would be to try to use a RenderTexture, but I do not know how you get the image data out of a RenderTexture.