Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Feedback Legacy "Animation" docs should be removed from the current version docs, or otherwise be segregated.

Discussion in 'Documentation' started by SlimeProphet, Jun 16, 2020.

  1. SlimeProphet


    Sep 30, 2019
    The docs currently mix the deprecated/legacy "Animation" class and its related classes and functions with the general "Unity Animation Module" API documentation. It is difficult for a newcomer to understand that these are actually part of the deprecated, legacy animation system. The classes and functions are not marked as legacy.

    On that page, the Animation class is described as "The animation component is used to play back animations." A newcomer might take that at face value. Although the Manual's FAQ clarifies that the "Animation Component" should no longer be used, the scripting API documentation does not.

    That page also lists the rest of the Animation class functions as if they are current.

    Drilling down into those docs, they also individually do not reflect their deprecated status. See here, here, etc.

    What makes this particularly difficult is there is no standard use of the word "animation." For example, while AnimationClip* and AnimationState are deprecated, AnimationEvent is not! But they are all listed together in the UnityEngine.AnimationModule page.

    Perhaps do two things:
    • Remove all the legacy Animation (class) docs from the current Animation (generic word) API documentation.
    • Use the label "Mecanim" across the board. Each documentation page can have a label or note that says "Part of the Mecanim system."

    *Or not. Although its documentation page says it's "used by Animation," with a link to the deprecated Animation class, it appears that it can also be used with the Animator class. But I think AnimationState is truly deprecated/legacy, even though it can use AnimationClips.
    Last edited: Jun 16, 2020
  2. Baste


    Jan 24, 2013
    So what happened was that Unity introduced the Animator component and Mechanim and all that jazz, and was all "let's deprecate the Animation component, it's not relevant anymore"

    Then it turned out that the Animation component performs better. Much better. Playing back an animation clip on an Animation component takes, in my tests, about half as much cpu time as the Animator. Hell, even playing a single clip using the Playables API is slower than using the Animation component to do the same.

    So they decided to not deprecate the Animation component in case people cared about performance. Which, you know, they do.
    SlimeProphet and AcidArrow like this.
  3. AcidArrow


    May 20, 2010
    Baste is right, which is why the solution is for the manual to stop discouraging use of the “Legacy Animation”.
    SlimeProphet likes this.