Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to add animation onto scene

Discussion in 'Animation' started by hasen, Apr 15, 2015.

  1. hasen

    hasen

    Joined:
    Apr 1, 2015
    Posts:
    29
    I asked this on unity answers but nobody replied so I'm answered so I'm posting it here too.

    I've seen in many tutorials that to create a new player character, you drag a collection of sprites onto the screen you can create an animation and then the character appears in the scene. But what if the animation is already saved? I don't seem to be able to drag and already saved animation onto the screen and I can't figure out why that would be. Seems very odd. I can create an animation and save it and then there is a player in the scene but I can't directly add an already saved one....
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    There is many way to add an animation clip to your game object.

    Easiest way is to drag and drop your animation clip on your scene game object directly. In this case Unity will create all the necessary object( Animator component and animator controller) if they don't exist already.

    To animate an object in Unity you need an Animator component and an Animator Controller, you basically create your animation logic in a controller.

    You should take a look at our animation tutorial for the animator component if you didn't already
    http://unity3d.com/learn/tutorials/modules/beginner/animation
     
  3. hasen

    hasen

    Joined:
    Apr 1, 2015
    Posts:
    29
    But it doesn't work. I'm using Unity 5 and if I drag for example the RobotBoyIdle from the standard 2D assets animation folder in the Unity project window, nothing happens....
     
  4. Phil_B91

    Phil_B91

    Joined:
    Jun 10, 2022
    Posts:
    1
    Did you ever find an answer?
    I got the same issue, drag and dropped an animation from PNG files into the scene. Deleted it for some reason. Then when I went to drag and drop from the folder I made for the animation nothing happened.