Off Screen GUI, Screen grab, top trumps

Hey. A question. i’m trying to great a top trump style screenshot for our game. I’ve got the basics up nice and working.

I load in a texture which is the background card, large enough to take a screen grab and the information underneath. I take my screen grab using a render texture and place it accordingly. Making a nice overall texture. The next stage is where i’m stumped. I’m using a yield to make sure my GUI gets included into the screen grab.

But i want to display information that i get from my game. I’ve tried placing GUI labels as test below what would be the screen dimensions. “new Rect(10, Screen.height + 20, 100, 100);” But the screen grab obviously only gets what’s on screen. Is there anyway to record a set amount of information from the whole GUI?

The second part of my question has been asked before here (http://forum.unity3d.com/threads/89230-Upload-Screenshot-VIA-PHP-or-Perl) but no further answer was forth coming so i ask for a fuller answer for those who know.

Our game is web browser based, for the test i’ve been using pc build settings to get a result, but long term i want to save the screenshot to the server so players can access them. All i need is an example of the perl, the example given didn’t help much, i have zero experience with Perl, softwizz was kind enough to give a link, but i just can’t get my head around how to do it with a unity script. So any help on this is appreciated.

I’ve attached the script i used, plus the orginal texture. Any questions please ask.

Thanks for any help.

Kyle.

799258–29318–$Screenshot.7z (1.16 MB)

so i cracked it. :slight_smile:

I created two classes, but it could be done in one. The first one, ScreenGrab.cs, basically takes a screenshot of whats on screen and saves into a texture which is 70% the size of the screen. Then in OnGUI() i position this after i put a blanket black texture across the whole screen, followed by a template behind it. The screen shot is then placed on top. With some GUI.labels underneath with some data.

The second glass called Screenshot.cs does something very similar in that it takes a screenshot of the screen but capped to the dimensions of the top trump texture. This is then saved to the hard disk using File.WriteAllBytes(filename, bytes);

So a top trump card for PC standalone.

I’ve attached the scripts below, along with the images (not great but meh, programmer art)

The second part of my problem i’ve still not solved. I still can’t get it to my server. The c# code seems fine, it’s the perl, so if anyone got any ideas on that, i’d be appreciative.

Kyle.

813123–30050–$Screenshot.zip (576 KB)