Camera animation not playing on start up.

I just animated a slow , basic animation for my camera and i have set the play mode to “Play automatically” . I have done some research and found to change my animation to legacy as well , I have done that. Everything should work but i think unity 5 has something to do with this i am sure, So what do i have to do to make a very basic animation play on start up.

I should also mention i tried making a line of code to force it to start using animation Events -

GetComponent(Animation).Play(AnimString);

This does not work.

I’m pretty sure that you might have some issues with the clip if this doesn’t work, simply playing an animation on start up (considering you have toggled it on the animation component) shouldn’t be any problem nor be affected by much else in your game.

Can you try making a completely new project and try again making an animation for an object and adding it? Make sure the animation is made for the object that you in fact are adding it on.