Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Feature Request Assign components to animation clip instead of animating the object by name

Discussion in 'Animation' started by lejean, Dec 31, 2022.

  1. lejean


    Jul 4, 2013
    After using the manual animation system a lot for animating UI or what not I feel like it's not really reusable.

    It would be so much easier if I could just drag and drop the components that are animated inside the animation window instead of animating it on a game object's name basis.

    If I want to reuse a animation now I have to make sure the gameobjects that I want to animate have the same name as the properties in the animation which is often not the case. So I just end up bloating my project with duplicate animation clips.

    I believe the timeline system even works like this.

    The data in the animation clip itself should basically be "A transform component rotates 360 degrees over 2 seconds" instead of "Cube: Rotation rotates 360 degrees over 2 seconds"
  2. Kybernetik


    Jan 3, 2013
    AnimationClips are assets and assets can't serialize references to scene objects because the asset might be loaded when the scene is not.

    Timeline has to jump through major hoops to work around that limitation and I don't think adding all that hacky complexity to the animation system would be a good idea.

    I agree that animations don't seem well suited to UI animations but the solution isn't to overcomplicate the animation system, it's to choose a better system for the purpose. For this, I'd recommend getting a tweening system. I made my own, but there are plenty on the Asset Store and elsewhere.