I added a basic template script for enemies behavior. From the Unity Editor you can set: Movement Speed, Detection Radius, Attack Radius, and Close Enough.

Move Speed: Sets movement speed of enemy
Detect Radius: Sets distance when enemy will start pursuing the Player
Attack Radius: Determines which distance is okay to start attacking player (Possibly reusable for ranged enemy behavior?)
Close Enough: Determines when the enemy is close enough to player to stop approaching. (Also maybe good for ranged? So they can stop to shoot?)

Make sure Close Enough < Attack Radius or else the enemy won't start the attack function.

If you want to reuse the code for other enemies:
-Be sure to either rename the "Speed" and "IsAttacking" parameters if you are using an Animator with different names for the parameters. Or just make sure the parameter names match.