GameObject not working with variable in C# script

I’m very new to Unity, but I’ve been following a tutorial on YouTube (by Brackeys) to make my first game. In the tutorial, he did ‘public Transform player;’, which should work as I have seen lots of people do it before. Basically my issue is linking a GameObject to a variable. The Transform component in the main camera doesn’t show up in the script but I don’t know why. Is anyone able to help solve this…?

Sorry if my terminology isn’t right, I’m still very new.

Here is a link to the video: How to make a Video Game in Unity - CAMERA FOLLOW (E04) - YouTube
I did exactly what he did, and for the main camera, but Transform isn’t showing up for the public variable. (Around 1:35 in the video.)

public class FollowPlayer : MonoBehaviour
{
    public Transform player; // This is the part that doesn't work - when I continue it normally changes it to CryptoAPITransform because Transform isn't available.
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

Hey this worked for me.


Go to Edit → Preferences → External Tools → External Script Editor, and change it to Visual Studios.

Have you tried changing it to something else other than transform? GameObject for example.

Update: I tried fixing this by restarting the project a bunch of times, but it still didn’t work. In the end, I switched to Brackets instead of Visual Studio and it worked just fine. Hopefully this helps someone.