If you played Pegtastic you’ll notice the iOS-like blur background effect used throughout the game. It’s an effective way to bring focus to menu screens without taking the user away from the original scene.
Adding this effect is surprisingly easy to do. Money was almost spent in the Unity Asset Store before realizing this simple effect was available out of the box in Unity.
Follow these simple steps to create this cool effect in your own game.
Import the “Effects” package (Menu -> Import Package -> Effects).
Select your main camera in the editor and view it from the inspector. Click the Add Component button and search for the Blur (Optimized) Script.
By simply adding this script to your camera object you now have an iOS like background effect.
If you play Pegtastic you’ll notice that I’m programmatically turning on and off the blur effect.
This can easily be done by using the code below in your game controller to toggle on and off the blur effect.
Surprisingly that’s all there is to it.
Did this Unity Tip help you out? If so please do us a favor and check out our game PEGTASTIC now available in the App Store, Google Play and Microsoft Windows Store!
Unity currently has a bug in version 5.5.0 and 5.5.0p1 that prevents the Blur (Optimized) effect from working when deployed to an iOS device. This effect still appears to work on Android and Windows devices. A bug report has been submitted and the Unity QA Team promptly responded that they were able to reproduce the issue and they are currently in the process of resolving it. Thank you Unity for your speedy attention and feedback!