Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

[IMG]

I like taking cool screenshots of my games, and over time I ended up putting up a couple of scripts together to help me get the perfect moment for a good screenshot.

As a unity developer, at first I used to try and manually pause the gameplay with the pause button of Unity Editor and manually pick the Camera game object and move it. I had a hard time getting the right angle with the transform tool, in the end my camera was in the wrong place to continue the game and the screenshot wasn't as high quality as I wanted because I was taking it in the editor.

So I put together pauseFreeCamera.cs , which can:

  • Press a button to toggle "Screenshot Mode"
  • Screenshot mode sets timescale to 0 "pausing the game"
  • Allows for disabling certain scripts while in screenshot mode, and re-enables them when exiting screenshot mode.
  • Allows for camera movement using the mouse while in screenshot mode (pan, zoom, rotate) for getting those nice angles. (I got this part of the script from somewhere, but couldn't find the original to credit :/)
  • Remembers the original camera position/rotation and returns you to it once screenshot mode has been disabled to resume gameplay
  • Let's you go to the next frame with a button, for when your pause wasn't exactly where you wanted but close.
  • With one button toggles "Slowmotion Mode" which allows you to use the middle mouse scroll to control the timescale, if getting that perfect moment you want is tricky within the game's regular speed.

That script has made it so much easier for me to get the exact moments for nice screenshots, I love the control it gives me over time and the camera :)

Now for actually taking the screenshots, I made a modified version of Saad Khawaja's hi-resolution screenshot script.

  • One button to take a screenshot at the set resolution.
  • Can pick a number to enlarge the resolution by, for taking high-resolution screenshots, which will produce better sharper results when scaled down.
  • Allows for transparent screenshots by toggling a boolean, for making cooltransparent pngs like this.
  • Saves to a screenshots folder outside of Assets, so unity won't try and use the screenshot as a texture.

With those 2 scripts in place I have a blast taking screenshots of Rocket Fist, playing around and stopping at good moments to find nice angles :D Here are some examples from today's #screenshotsaturday:


[IMG]
[IMG]
[IMG]


Lastly, I made a little 2 minutes video showing the scripts in action and talking a little bit more about then.
Well, that's about it, I hope this helps someone out there how it has been helping me :) If you have any questions feel free to ask.