I'm having trouble with accessing the 'Depth of Field' image effect that's placed on the main camera in my scene.
I'm trying to change two things the "Focus On Target" and also the effect amount so I can fade it completely away. (I'm aware that there isn't a current Effect Amount variable so please could someone explain how I could go about adding this to the depth of field effect)
I don’t know what Unity version you guys are using, but there is no “Depth Of Field” script in Unity 3.5 or Unity 4. There is a “Depth Of Field (34)”, a “Tilt Shift”, and a “Depth Of Field (Scatter)”. Is there something I’m missing, like a built in script or something? Or did you just write “DepthOfField” because different people use differnet scripts? I’m mentioning this not because I’m that jerk who corrects people or anything but because the script is not working for me and I am wondering if there is an obvious reason why. The “amount” in my script is the value of a knob from the iGUI user interface plugin. Here is the script I have:
So what I’m wondering is, is there something obviously wrong with my script, or is this just because my version of unity is too new? And yes I did add the component to the main camera and I did use the right variables (I think).
Thanks great work on the Effect Amount makes a nice quick fix, one problem Object Focus is not found :/
– Caiusetry objectFocus
– DaveAGetComponent(DepthOfField).focusOnThis Is the paramater
– CaiuseReally? I just coded something almost exactly like this yesterday, I thought it was objectFocus...
– DaveAMaybe i'm using some outdated Unity assets, it's focusOnThis or objectFocus depending on your unity assest version for anyone who is trying this.
– Caiuse