I want to do a simple dark backdrop of the screen. For example, if the pause menu of the game is gonna appear, I want to darken the screen and then show the pause menu. I understand that there are multiple ways of doing this, and I know how to do the ways I am aware of (such as (1) using camera effects, (2) using a black GUITexture in front of the camera and managing its alpha channel, and (3) playing with the lighting of the scene).
My game is completely light-free, so option (3) is out. Which one ((1) or (2), or any other method I have not mentioned) is the most efficient for a mobile platform like iOS? I’m concerned about all that alpha blending on every pixel of the screen.
Any thoughts? Thanks in advance!
Instantiating a black GUITexture or even a textured 1x1 plane in front of the rest of the menu is pretty efficient. Although for a pause menu I wouldn’t be too worried about performance.
You could even have two cameras, one for your game, one for your pause menu, and only render those respective layers on each camera, so you simply disable one camera, and enable the other.
The most efficient way would be to use option 2 (GUITexture with alpha across the screen) for a single frame, setting the camera to not clear out the display buffer and then disable rendering of everything else in the scene. If you need the pause menu to be interactive, you would copy the screen to a render texture and use that texture as the background instead (this would require Unity Pro).
This is most likely overkill, just putting a simple GUITexture over the screen should run just fine.
I found using an Image on a canvas stretched across the screen was quite an easy way to do this.