- Home /
Dragging animation onto object gives no option to name animation on creation [Windows/Unity 5.1]
I've been working on the 2D Roguelike tutorial offered by Unity and ran into an issue with animations. In the video, we create animations from a sprite sheet by highlighting a set of frames, then dragging them onto the appropriate object. In the video when this is done, Unity prompts the user to specify where the animation is created as well as a name (see 54s on the video); however, when I do this I get no such option. I do note that the video is done using a Mac and I have Windows, but I hope a solution exists still.
This is very frustrating because it forces me to find the animation at the end of my sprite list, rename it, drag it to the animations folder, and then rename the state inside my animation controller.
Several people have had this same problem, as they mention in the video comments, but I have not been able to find a solution thus far. Thanks in advance!
Select your Animation or Controller in the Assets list, select the desired asset and hit F2 to rename.
Answer by Idji · Jul 20, 2015 at 08:56 AM
Looks like it's not a problem. Look at this link http://forum.unity3d.com/threads/2d-roguelike-q-a.297180/page-7#post-2193338 and answer post after it.
In short, as i understand, in Unity ver 5.1+ there is no auto-show "New Animation Window", and things are work a bit another way. You can rename your animation simply select it and hit F2. After that you need manually rename it in animation controller. And if you(as me) don't know is animation applied to gameObject do next:
Select game object
hit ctrl+6
Now you see an animation of object. Currently you see only one, but if you click on name of animation, you will see drop down list with all animations, applied to object.
Another way: copy-paste from here http://forum.unity3d.com/threads/2d-roguelike-q-a.297180/page-7#post-2211494.
The most efficient way I've been able to figure out was to: select the desired frames from the sprite sheet, right click -> create -> animation (it let's you rename it as you do it), check the "Loop Time Box" in the animation, click and drag animation onto the player object (this doesn't create the sprite renderer), in the player object add component -> sprite renderer, click and drag the animation and its controller into their respective assets folders.
Answer by Cherno · Jul 19, 2015 at 10:04 PM
This is how you do it:
Drag the selected Sprite(s) from the Sprite Sheet in the scene view or hierarchy.
In the Animation window, you should see a message "To begin animatin XY, create an Animator and an Animation Clip" and a button "Create".
Click the button, and the Animation component will be added, and a prompt to create a new Animation Clip will open.
Create the clip, and then in the Animation window select SpriteRenderer -> Sprite.
???
Profit!
i do 1 step. in second step - i open animatio nwindow and see that
looks like Animator and SpriteRenderr are apply to sprites automatically
No message showed up when I dragged from sprite sheet to an empty opbject in the hierarchy. The animation window was open. The image Idji has is the same thing that happens for me.
Don't drag the sprite to an empty gameobject. Just drag the sprite to the scene so a new GO is created.
Answer by Idji · Jul 20, 2015 at 06:26 AM
Look for explanation here
http://forum.unity3d.com/threads/2d-roguelike-q-a.297180/page-7#post-2193338
and here
http://forum.unity3d.com/threads/2d-roguelike-q-a.297180/page-7#post-2211494
In short, as i understand, there is no window, what we see in the tutorial in Unity ver. 5.1 it's work in a bit another way. So you can drag tiles on gameobject, and animation will create automatically. Then you manuall can rename animation of press ctrl+6. After that you need to rename it in Animation Controller.