FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

Share

descriptionBlurred Background GUI Script (will need UnityPro for example)

more_horiz
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


_________________
-BryceCain25

descriptionRe: Blurred Background GUI Script (will need UnityPro for example)

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

descriptionRe: Blurred Background GUI Script (will need UnityPro for example)

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

descriptionRe: Blurred Background GUI Script (will need UnityPro for example)

more_horiz
[You must be registered and logged in to see this link.] wrote:
Very interesting! Unfortunately I do not have a copy of pro atm to test this method.
Yeah, sorry about that Sad

_________________
-BryceCain25

descriptionRe: Blurred Background GUI Script (will need UnityPro for example)

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

_________________
-BryceCain25
Permissions in this forum:
You cannot reply to topics in this forum