What is the problem with this code?

using UnityEngine;
using System.Collections;

public class CameraControls : MonoBehaviour {

	Transform target; 
	int distance = -10;
	int lift = 1.5
	
	// Update is called once per frame
	void Update () {
	transform.position = target.position + Vector3(0, lift, distance);
		transform.LookAt(target);
	}
}

using UnityEngine;
using System.Collections;

public class CameraControls : MonoBehaviour {
	 
	public Transform target;
	int distance = -10;
	float lift = 1.5f;

	void Update () {
		
		transform.position = target.position + new Vector3(0, lift, distance);
		transform.LookAt(target);
	}

}

  • 1.5 is float
  • missing β€œ;” @ int lift = 1.5
  • missing (as vexe said) β€œnew” - required in C#, not required in JS