Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » FREE Project Downloads & Recources » Scripts » Blurred Background GUI Script (will need UnityPro for example)

Blurred Background GUI Script (will need UnityPro for example)

View previous topic View next topic Go down  Message [Page 1 of 1]

BryceCain25


SUPER MODERATOR
SUPER MODERATOR
oohy gohy we get into the good stuff now!
This tutorial will show you how to add a simple GUI that you switch to and the background is blurred.
since the gui does not represent physical 3d space, the blur does not overpass the UI.
ok, let's get started.


phew..here is some code Smile

Code:

#pragma strict
var playerCam : Camera;
var GUICam : Camera;
var justsometext : String;

function Start () {
playerCam.enabled = true;
GUICam.enabled = false;
justsometext = "Look at this cool GUI!";
//this will not cover all of what you put on the GUICam, please scroll down further
//thank you


}

function Update () {
if(Input.GetKeyDown("2")) {
playerCam.enabled = false;
GUICam.enabled = true;

}
if(Input.GetKeyUp("2")) {
playerCam.enabled = true;
GUICam.enabled = false;
}



}

function OnGUI () {

GUILayout.Label(justsometext.toString());

}



Ok now that's out of the way, that should be a solid script.

now apply the DepthOfField34 script in the image effects folder to the GUICam
(Unity Pro Required)
now you should be able to get a good result.
Thank you guys!
-BryceCain25

View user profile
Very interesting! Unfortunately I do not have a copy of pro atm to test this method.

View user profile http://www.youtube.com/user/misterninjaboy

DeveloperLuke


Moderator
Moderator
must be pretty cool! if only i had a copy of UNTIY PRO

View user profile

BryceCain25


SUPER MODERATOR
SUPER MODERATOR
MisterNinjaBoy wrote:Very interesting! Unfortunately I do not have a copy of pro atm to test this method.
Yeah, sorry about that Sad

View user profile

BryceCain25


SUPER MODERATOR
SUPER MODERATOR
wooden_sword789 wrote:must be pretty cool! if only i had a copy of UNTIY PRO
It is a very cool effect Very Happy

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum