- Home /
How do I access the 'Shader' property of the Greyscale Effect?
When I add the Grayscale Effect at runtime to a camera the Shader property is removed from the component.
I can manually add this again by simply dragging the Grayscale Effect shader into the inspector but when I attempt to do this in code I have no idea how to access the components shader.
I have tried myGrayscaleComponent.Shader=Shader.Find("Greyscale") but that doesn't work.
Comment
Answer by grimmy · Aug 10, 2012 at 05:18 PM
Actually myGrayscaleComponent.shader=Shader.Find("Greyscale") works! (Lower case s...doh!)