C# AI move on Sight

im trying to put my AI to move and attack the player when the player enter its field of view but i cant i just dont know what code to use im very new to unity and my code is a little weak so can someone help me

the enemy is a melee and he cant see through walls i made a box collider 2D from his back to his front and i whant when ever the player wallks in to that box collider that is coming out of him the enemy starts moving to him this game is like a dungeon kind of game with a big maze and all that stuff