Search Unity

Animation clips on object, but Clip Count is 0?

Discussion in 'Animation' started by BrainAndBrain, Mar 7, 2018.

  1. BrainAndBrain

    BrainAndBrain

    Joined:
    Nov 27, 2014
    Posts:
    115
    Weird question, but: is there a way to view animations on an object when using a Runtime Animator Controller?

    I have an animation on an object with an Animator component and no Controller. I can play it back just fine at runtime (using Playables), but the Animation window in the Editor shows no clips. So once I’ve made the clip, I can’t see what I’m doing if I want to tweak it.

    Also, Unity insists on creating an Animator Controller asset every time I create a new Animation clip on the object. So I guess I can’t get around having an Animator Controller, even though its not required for playback at runtime?

    Interestingly, this Unity blog post shows a Runtime Animator Controller being used with Playables, and the Clip Count on the Animator component is greater than 0.

    Any ideas? Thanks!
     
  2. BrainAndBrain

    BrainAndBrain

    Joined:
    Nov 27, 2014
    Posts:
    115
    Bumping this, as I still have no solution for it.
     
  3. rozatlab

    rozatlab

    Joined:
    Dec 7, 2018
    Posts:
    6
    @BrainAndBrain did you ever find a solution for this? I'm having the same issue. I show several clips when I open the controller, but the component on my GameObject says "Clip Count: 0"
     
  4. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,570
    You can create Animation Clips without it making an Animator Controller by Right Clicking in the Project window and using Create -> Animation.

    And you can have the Animation window pick up the clips you are using in Playables by implementing the IAnimationClipSource interface in your script.

    But I haven't had any issues with the Clip Count not showing the correct value when using Playables.
     
    GEvans13 likes this.
  5. BrainAndBrain

    BrainAndBrain

    Joined:
    Nov 27, 2014
    Posts:
    115
    @rozatlab Unfortunately no, I didn't find a solution. I ended up just switching to full mecanim, giving each character an Animator Controller of its own, and not using Playables for animation at all. Sorry!
     
  6. dvelasco

    dvelasco

    Joined:
    Jul 23, 2014
    Posts:
    7
    I just ran across this, and my tip is this: is your animator attached to the root object in the animation hierarchy for those animations?

    I observed that animators could be attached to the objects under the root without a problem, but they returned a "clip count 0" in the feedback section of the animator inspector. They don´t return an error, but I suspect that they do nothing for you, either.

    Cheers!
     
    cosmicplay likes this.
  7. cosmicplay

    cosmicplay

    Joined:
    Jun 30, 2022
    Posts:
    1
    In the controller, the actual animation clip must be attached to the Motion option in the Inspector. Screenshot_39.png