Forum rules - please read before posting.

Cannot play animations?

edited January 2019 in Technical Q&A

I have tried FOR DAYS to make my player character animated. My character is called Mono, so i called my walk animations MonoWalk and my Idle animations for MonoIdle. (i have deleted the walk animations for now, and i'm now focusing on working out the idle animation first, then making the walk animations again)

I now have sprites, prefabs and animations called MonoIdle_D/R/U/UR/DR. I have dragged these into my characters animator controller with the MonoIdle_D as the default.

My problem is: in the "Standard 2d animation" tab, None of my animations turn up in the "list of expected animations" and my player doesn't play any of the animations in gameplay. I don't know what to do anymore, i feel like i have searched the internet for answers but i still haven't cracked the code. Can you guys help me?

Video of the screen while in gameview:


  • Welcome to the community, @philippalund.

    Your Player inspector and Animator Controller look fine, but where on your Player is the Animator component that contains this controller? When you run the game, the Console warning message at the bottom is claiming that the animations cannot be found.

    I suspect that this issue is down to the way you've set up your animations in Unity, rather than AC. AC still relies on Unity's animation system, so you need to abide by Unity's animation workflow in order to make use of it.

    Be aware that the animation, sprite and hierarchy necessary to play your animations have to be on your player - the "MonoIdle" GameObject you have disabled is not going to be used by the animation system. You need to set up your animation so that the player sprite ("MonoCharacter") is equipped with the necessary animation.

    It also looks like you're relying on Unity's new 2D animation package - is this correct? AC can still work with this, but it's a little more complicated to set up since your animation would then involve animating individual limbs as separate GameObjects. If you're just starting out, it may be worth sticking to single-sprite animations in the same way that the 2D tutorial does.

    To incorporate the new 2D animation package that you're using, I'd suggest moving the whole hierarchy ("MonoIdle") onto your Player's root, making that the new "Sprite child" transform, and then removing "MonoCharacter". Your character's Animator component would then need to be on MonoIdle, and then also animates the enabled state of each child in the Hierarchy (so that e.g. the "MonoIdle_R" animation enables the "MonoIdle_R" GameObject, and disables "MonoIdle_U", "MonoIdle_D" etc.

    Also be aware that if you change the Animator's position in the hierarchy, you may have to rebuild your animations, since the animation properties are all recorded relative to the Animator.

  • Thank you for your answer. I don't really understand the process of incorporating the 2d animation package by changing the hierarchy. i tried moving the "MonoIdle" with all it's children under my new player and deleted monocharacter. by choosing MonoIdle as my new player, it constantly shows all of the sprites. I had no idea using the 2d animation package would be such a hassle, it seemed straight forward online.
    I only have experience with the 2d animation package, but if single-sprite animation is easier i would love to try that. single-sprite animation is animating with sprite sheets, right? i have no idea on where to start with that, and is it possible to make a sprite sheet with skeletal animation? I really like the flow and ease from working with bones and IK.
    Can you point me in a direction of where to learn this?

  • Bone/IK based animation using Unity's new 2D tools is certainly possible with AC, but it is a step-up in complexity. By all means switch to that when you're more familiar with Unity and AC.

    if single-sprite animation is easier i would love to try that. single-sprite animation is animating with sprite sheets, right?

    Sprite sheets, or individual frames in separate texture files - Unity treats them the same. The main feature is that you're basically just "swapping out" a single SpriteRenderer's Sprite each frame.

    This is the method used in the 2D tutorial. Though the animations are pre-made from the 2D Demo game's assets, they were done so using Unity's animation workflow outside of AC. You can find a wealth of tutorials on how to do this on Unity's site and also Youtube - see this tutorial, for example.

    by choosing MonoIdle as my new player, it constantly shows all of the sprites

    See my comment about about enabling/disabling the different directional sprites as part of the animations themselves. An Animation asset can control all properties below the Animator's hierarchy, so if your Animator is on MonoIdle, then you can e.g. disable the MonoIdle_D/U/UR/DR sprites within your MonoIdle_R animation. Open up your Animation window, select the MonoIdle_R animation, and (while recording) disable those other GameObject chains.

  • Thanks A TON Chris! I finally got it to work!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.