Can anyone make a script that allows CameraFade


So basically, I’ve been looking around, maybe not good enough… But I’ve been wanting to get a script that applies as:

Player looks at GameObject, MainCamera then fades black slowly, IF Player looks away from GameObject, fades back to normal.

This is a script I want to use for the purpose of;

My character in game looks at someone and gets scared (Camera.Fade), but as he looks away he doesn’t. (Camera.Fades.Back) That is a brief example.

I’m asking on here because I know there are a lot of professionals around. I also ask because every time someone tells me, I learn from it.

Here is a camera fade script:

However, it seems like you are posting a lot of questions of a very basic nature or even which have good examples that can be found. It is my suggestion you expend a little more effort and learn the basics, before you post a question.