Hi,
i want to automatically disable and then enable Depth of field with looping forever, the script is attached to my main camera. I want the transfer from enabled to disabled position to be smooth and than loops forever.
Is there some preset function in unity, or do i have to somehow implement it in my script manually?
thanks.
ok, i have managed to work it on prressing spacebar, but how do i make it loop? #pragma strict private var myLight : DepthOfFieldScatter; function Start () { myLight = GetComponent(DepthOfFieldScatter); } function Update () { if(Input.GetKeyUp(KeyCode.Space)) { myLight.enabled = !myLight.enabled; } }
– vojtechrada