- Home /
Can't use depth of field script
Hi there. I'm trying to add DepthOfField.cs to my Main Camera object. I found DepthOfField.cs at standart assets and import it, and import PostEffectBase.cs and Quads.cs too. But I can't enable depth of field. It not turning on, but if I try to turn on at gameplay mode, I see error: NullReferenceException: Object reference not set to an instance of an object UnityStandardAssets.ImageEffects.DepthOfField.OnRenderImage (UnityEngine.RenderTexture source, UnityEngine.RenderTexture destination) (at Assets/Standard Assets/Effects/ImageEffects/Scripts/DepthOfField.cs:161)
And that's all. I don't find any documentation for it. Can you help me?
Your answer
Follow this Question
Related Questions
How do I get camera image effects to work with 2D Sprites? 0 Answers
My camera not rendering anything in Custom render type,I have an issue: 0 Answers
Why do my sprites/textures darken whenever I move my camera? 0 Answers
Passing Underneath Section of a Mesh 0 Answers
How to create texture from multiple sprite in unity2d? 0 Answers