how to make the enemy patrol, see and shoot

Hello everyone!

I wonder do with the enemy of my game ships patrolled stay and then when a certain proximity of my player he shoots towards my player

um… you can use spherecast to deal with seeing player.
And nav mesh agent to deal with AI, it is quite easy

This tutorial will show you EXACTLY what you’re trying to do. Unity Stealth Game Tutorial Specifically chapter 4.