Idle animation doesn't loop - Unity 5

So I decided to upgrade to Unity 5 and I’ve started a game from scratch, I was doing the idle animation for the main character and in the animation window when i press play it works fine.

However when I press play and look it the game window it plays once and freezes on the last frame, not sure what’s wrong with it. Is there something I need to do before I put it in my game.

I haven’t imported it

All you have to do is go into your project window and click on your character. In the inspector window you will find 3 different tabs [ Model , Rig, Animations ]. Simply click on Animations and scroll down to your animation i.e. idle. Make sure both “Loop Time” and “Loop Pose” are check.