It is posible to add a [RequireComponent (typeof( xxxx ))] but with Global Fog ? I’m trying it, but I can’t do find the Global Fog by script…
(screenshot) http://puu.sh/rPDoN/05fd5d58b7.jpg
I have a test adding the UnityStandardAssets.ImageEffects but doesn’t work neither…
Not sure why the GlobalFog class would not be public. The only time I’ve made private classes are when they are classes within a class. I don’t like how a lot of the standard assets are weird like this. However, I think what Unity is trying to do is to force you to copy these classes out of the Standard Assets and make your own class. Pretty annoying. Not even sure how it serializes properly being a private class…
So in short, to use the GlobalFog class outside of the same file it is in you’d need to make it public like you’ve done. Or make your own copy of it.
Thanks @Naphier. It’s a weird way to do it but I suppose I will create my whole GlobalFog class, thanks for the answer.