Hello
I was using a script to make a camera follow a gameobject, but target.transform doesn’t work and is marked as an error.
using UnityEngine;
using System.Collections;
public class CameraPlayer : 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);
}
}