Hi,
I wanted to enable the bluroptimized script in my OnTriggerEnter() function but ontriggerenter function doesnt attached to my camera it attached to another object so i want to reach my camera through the other object’s script. And after the player gets out of the zone i want to disable it again. I tried GetComponent(BlurOptimized).enabled = false but it errors
here is my ontriggerenter function
function OnTriggerEnter (Col : Collider)
{
if(Col.gameObject.tag == "Player")
{
enterCollider = true;
Debug.Log("Is inside collider");
;
}
}
function OnTriggerExit (Col : Collider)
{
if(Col.gameObject.tag == "Player")
{
enterCollider = false;
}
}
Thanks for help