I have a Camera with a simple animation on it ( rotation , it is of 7 seconds). I have made a script through which i want to trigger the animation, but it doesn’t seem to work. Here is the code and the Settings.

settings

I have a Camera with a simple animation on it ( rotation , it is of 7 seconds). I have made a script through which i want to trigger the animation, but it doesn’t seem to work. Here is the code and the Settings.

settings

Try putting that code in the 'Start' function instead, so that it only executes once instead of every frame. Possibly, the problem is that it is constatly trying to start the animation, and so it is resetting it to the beginning every time!
Also, you can't use WaitForSeconds outside of a coroutine- if you use SendMessage like that, instead of StartCoroutine, it will skip straight past that line.
no luck , i noticed something - the animation doesn't play even when i check play automatically
– anon79323214How did you make your animation? There might be other things interfering here that you haven't told us about (possibly because you didn't think they were important). For example, how is the camera moved when it is not animating?
– syclamothalright , first of all the animation is made in Unity. Second the camera is a FPS camera , it is controlled by player when its not moving by engine
– anon79323214i got it working by changing Update to start and reseting the variables of script and Camera (animation ) thanx :D
– anon79323214