Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

My Animation don't work!

Discussion in 'Animation' started by Hollo1001, May 12, 2015.

  1. Hollo1001

    Hollo1001

    Joined:
    May 10, 2015
    Posts:
    5
    Code (JavaScript):
    1. var BulletSpawn : Transform;
    2. var Bullet : GameObject;
    3. function Start () {
    4.  
    5. }
    6.  
    7. function Update () {
    8. if(Input.GetButtonDown("Fire1")){
    9. animation.Play();
    10. Instantiate(Bullet ,BulletSpawn.transform.position ,BulletSpawn.transform.rotation);
    11. }
    12. }
    Animation is attached:

    But it doesn't play!
     
  2. Hollo1001

    Hollo1001

    Joined:
    May 10, 2015
    Posts:
    5
    ok i have found a way ... (closed)