How to make enemy randomly generate in world and when nearby attack player (Like in Slender)

I´m currently developing a game and i would need help how to get enemy randomly spawn somewhere close to player and when the enemy is close to player the enemy would attack the player. Anykind of help is appreciated.
(My english is little bad :P)

@Agor,

Your post (as it appears now) isn’t something we can give you a quick answer for, and isn’t really appropriate for UnityAnswers. The UnityAnswers philosophy is:

“[Unity Answers] is a place to ask specific questions that have specific answers. The forum is a better place to post discussions and non-technical questions.”

It sounds like what you’re looking for is Unity training, rather than a specific answer. I would suggest visiting the following training websites to find the one that best helps you move forward. In addition to the sites below, you can always search YouTube, which has a large number of user-created Unity tutorials.