smart objects

are there smart objects in unity

example if player presses x near the object then the player interacts with the object.

You can make your own. You attach scripts to objects. Have you seen the documentation?