c# public variables not appearing in inspector

Hey there, I’m just trying to make a simple script that lets a camera follow a character since parenting the camera doesn’t work. For whatever reason, none of the variables appear in the editor, so naturally it runs into issues since I can’t drag the character into the variable slot. Anyone know what’s going on? Here’s the code:

using UnityEngine;
using System.Collections;

public class cameraTracking : MonoBehaviour {

	public GameObject targetl;
	public float xOffset = 0;
	public float yOffset = 0;
	public float zOffset = 0;
	
	void LateUpdate() {
		this.transform.position = new Vector3(target.transform.position.x + xOffset,
		                                      target.transform.position.y + yOffset,
		                                      target.transform.position.z + zOffset);
	}
}

The reason the variables are not being displayed is because there is a compile time error in your script because LateUpdate is referring to the variable target when you only declare a variable named target1. Use the following:

using UnityEngine;
using System.Collections;
 
public class cameraTracking : MonoBehaviour {
 
     public GameObject target;
     public float xOffset = 0;
     public float yOffset = 0;
     public float zOffset = 0;
     
     void LateUpdate() {
         this.transform.position = new Vector3(target.transform.position.x + xOffset,
                                               target.transform.position.y + yOffset,
                                               target.transform.position.z + zOffset);
     }
 }