im a new game dev and im trying to make enemy ai for my fps game but when i use the .find to find the player i cant no matter what i do
private void Awake()
{
player = gameObject.find(“FPSPlayer”).transform;
agent = GetComponent();
}
it just says Assets\scripts\enemyAI.cs(21,29): error CS1061: ‘GameObject’ does not contain a definition for ‘find’ and no accessible extension method ‘find’ accepting a first argument of type ‘GameObject’ could be found (are you missing a using directive or an assembly reference?).
and i dont know what to do.
thanks for helping