Search Unity

Turn of all GUI before taking a snapshot..

Discussion in 'Scripting' started by Fillock, Mar 4, 2015.

  1. Fillock

    Fillock

    Joined:
    Mar 18, 2009
    Posts:
    73
    Hi all!

    I want to take snapshots form the screen without any GUI elements in the pictures. I found
    Code (JavaScript):
    1. Application.CaptureScreenshot
    can do the job, but it records all GUI elements too.

    I tried 2 cameras, one with the navigation GUI and one without, but it did not work. Is there any GUI Class that can turn of GUI for a second or two? (yes I Google'd and looked in the Script-reference).

    Any other ideas how to solve it?

    Thanks for answering, Fillock
     
  2. mantekkerz

    mantekkerz

    Joined:
    Dec 24, 2013
    Posts:
    111
    I have my UI in canvas groups, set alpha to 0, take screenshot then set alpha to 1 again. Not the most elegant solution but it works.
     
  3. Fillock

    Fillock

    Joined:
    Mar 18, 2009
    Posts:
    73
    Hi, that was an idea! At this stage I'm happy as long it works, elegant solutions can wait for another time :)