Changing settings of image effect.

So I am using
this.gameObject.Addcomponent ();
to add the BlurOptimized script to my camera on start. When I do that though, the shader is not added to it and I get a bunch of errors.

How do I set the shader and change other parameter such as blur iterations?
Much appreciated :slight_smile:

If you copied and pasted that straight from your code: You need to capitalize that C.

If not, copy and paste your code. :slight_smile:

Ok will do haha. I just typed it out. Any idea with the original topic? It adds the component. I just need to set the parameters.

If the component is already on the object, use GetComponent instead?