- Home /
TiltShift post effect generates compile error
In my project I upgraded to unity 5 I was using a tilt shift post effect on the camera. I have a script on the camera object that gets the instance of the tilt shift script running on the camera. I have added the new namespace to my script to support the new way these post effects are accessed in script and this has worked for my other post effects but for some reason tilt shift and contrast enhance both generate compile errors as if they don't exist in the namespace. Right now I'm just trying to allocate a private reference in my script to the instance running on my camera. Does anyone know what is causing this? At the top of my script it just looks like...
private TiltShift m_tiltShiftEffect;
private void Awake() { m_tiltShiftEffect = gameObject.GetComponent(); }
Right now I have the awake method commented out and I'm just trying to get the freaking script to compile by recognizing TiltShift as a valid class/object.
Answer by CameronOtten · Jun 05, 2015 at 08:23 AM
This one had me scratching my head... very simple, probably something they overlooked, just go into the tilt shift script and make it a public class
OH $$anonymous$$Y GOD. Thank you. This was driving me absolutely insane,
OH $$anonymous$$Y GOD. Thank you. This was driving me absolutely insane,
Your answer
![](https://koobas.hobune.stream/wayback/20220613185207im_/https://answers.unity.com/themes/thub/images/avi.jpg)