why is Transform, KeyCode, Vector2 and Instantiate does not exist in the current context?

Im using the 2018.1.6f1 version of unity. I already use Vector2 in my other codes and it works but my unity version of it was 2017. Is this because of the update?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour {

public Transform baseDot;
public KeyCode mouseLeft;
public static string toolType;

// Use this for initialization
void Start () {
	
}

// Update is called once per frame
void Update () {
	Vector2 mousePosition = new Vector2 (Input.mousePosition.x, Input.mousePosition.y);
	Vector2 objPosition = Camera.main.ScreenToWorldPoint;

	if(Input.GetKey (mouseLeft))
	{
		Instantiate (baseDot, objPosition, baseDot.rotation);
	}
}

}

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class NewBehaviourScript : MonoBehaviour
{
	public GameObject baseDot;

	void Update()
	{
		Vector2 mousePosition = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
		Vector2 objPosition = Camera.main.ScreenToWorldPoint(mousePosition);
		if (Input.GetMouseButtonDown(0))
		{
			Instantiate(baseDot, objPosition, baseDot.transform.rotation);
		}
	}
}