Search Unity

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

    SlimeProphet

    Joined:
    Sep 30, 2019
    Posts:
    50
    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

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    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

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,741
    Baste is right, which is why the solution is for the manual to stop discouraging use of the “Legacy Animation”.
     
    SlimeProphet likes this.
  4. Ziflin

    Ziflin

    Joined:
    Mar 12, 2013
    Posts:
    132
    Does anyone have details about this from a Unity source? I'd really rather prefer to use the legacy animation as the Animator/Mechanim API just gets in the way and makes it more annoying to split out animations for things like skills/abilities and it's obviously a lot more annoying for simple objects that only need maybe 2 animations.

    Is any work still being done on the Playables API? It sounds like it could be better, but the docs are severely lacking and last I read, there were some issues with playing being delays a frame (because it wants to play frame 0).
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,741
    https://forum.unity.com/threads/animation-status-update-q2-2021.1125482/#post-7558258

    Not exactly "details", but still.

    Not really, mostly just "fixing critical issues".
    https://forum.unity.com/threads/animation-status-update-q2-2021.1125482/#post-7611418
     
  6. Ziflin

    Ziflin

    Joined:
    Mar 12, 2013
    Posts:
    132
    Thanks for the info @AcidArrow . It's pretty frustrating dealing with 4 or 5 animation APIs that all have different issues...