Is it possible to use a RayCast (idk know what a raycast is) to select an enemy? Like if i have a variable lets say
public Transform EnemySelected;
And i wanted it if you clicked a object that had the script NPC_AI.cs that this variable would equal that enemy? If it is possible how could i go upon doing this?
Sorry i forgot to include this i have a tag also set up if its an enemy