Getting Script from Main Camera

I have a camera script that I’ve attached to my main camera and a player script that is trying to get hold of that camera script.

From what I’ve read here and there, this should work :

Cam = Camera.main.gameObject.GetComponent<SC_Camera>();

Except this returns null and yes the main camera does have the SC_Camera script.
Any ideas? :-S

Try:

Camera.mainCamera.GetComponent<SC_Camera>();

or

alternatively you could find the Main Camera in the scene by using:

GameObject Cam = GameObject.Find("Main Camera");

then access the script using the Cam object - this isn’t required, however.

Cam.GetComponent<SC_Camera>();