character automatically detect stairs than start climbing stairs

how i can detect stairs in game world,then play a animation stair climbing,like first person games when stairs come in front of character its starts climbing stairs

You could place a GameObject with a Trigger Collider in front of the stairs and, in a script, use OnTriggerEnter() to start the animation.

Hope this helps.