Hello! I ask you something, how do I assign to the variable “Target” each object with a tag in a shooting range? Thank you!
using UnityEngine;
using System.Collections;
public class LookTarget : MonoBehaviour {
public Transform target;
void Update()
{
// Rotate the camera every frame so it keeps looking at the target
transform.LookAt(target);
}
}