Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Issues with animations and the input system breaking with 2021.2.0F1 & onward

Discussion in 'Animation' started by esco1979, Nov 15, 2021.

  1. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    Hi, everyone. I just upgraded from 2021.1.24f1 to first 2021.2.0f1. And I quickly noticed 2 things:

    1. Some of my animations were suddenly breaking; as in an animation that was fine in the previous version of Unity suddenly had sprites labeled as "missing." Yet I could go to the sheet for the sprite that was supposedly missing and see it is there and fine. And I could drag it back in and it would show up fine. Obviously, this is a HUGE issue as who knows how many animations this could occur with.
    2. The input system was suddenly breaking for Analog controls (2 shoulder triggers, and analog sticks): as in Unity acts as if they would randomly get stuck. I am using an xbox360 controller and if I go back to the old version this doesn't happen. I also checked in windows AND in the input debugger and confirmed that both clearly lists the inputs as NOT being pressed. Yet I can put in a Debug.Log check under the callbackcontext.cancelled event and confirm that when this action occurs, it will NOT be called. So Unity if acting as if they are still being held. When this occurs, If I press the analog control again and release it THEN unity will act like it was released.
    So I then tried upgrading to 2021.2.2F1; the same issues occur. But if I go back to my old file for 2021.1.24f1 they do not.

    And to be clear: I have not changed ANYTHING in the files I upgraded to the newer versions. I literally just copied the project folder, upgrade the project to the newer version, and the issues instantly begin occurring. I have tried this 3 times now with the same results.

    I wasn't sure where to put this honestly; is anyone else having these issues?

    P.S. I am using Windows 10 if that helps.
     
  2. KalOBrien

    KalOBrien

    Administrator

    Joined:
    Apr 20, 2021
    Posts:
    89
  3. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    So is anyone else encountering this bug?

    I did put in a report as suggested.... but it would be very odd for it to be a bug if no one else has the same issue.
     
    Last edited: Nov 18, 2021
  4. midsummer

    midsummer

    Joined:
    Jan 12, 2017
    Posts:
    38
    I tried to update my project from 2021.1.20f1 to 2021.2.2f1 and sprite references broke in at least one animation, as far as I could tell by a quick test.

    I think the animation in question may have been cloned by a scene template, if it matters. The scene template's inspector UI felt broken in 2021.2.2, checking and unchecking listed assets without any rhyme or reason, so I just gave up on it and went back to 2021.1. Then I got rid of the scene template altogether, it was only making things complicated.
     
    esco1979 likes this.
  5. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    Both issues are still present in 2021.2.7f1.

    To ensure it was NOT a user error, I made an exact copy of the folder with my project and then upgraded it. The project using the old version of Unity (2021.1.24f1) works fine. The copy using the newer version of Unity DOES NOT! And it is the exact same animations that have the issue just like before AND the exact same buttons (analog) as well.

    Has there been any news on these bugs? They are literally game breaking.

    EDIT: I have confirmed the issue is NOT present in 2021.1.28F1 but IS present in 2021.2.0F1
     
    Last edited: Jan 6, 2022
  6. esco1979

    esco1979

    Joined:
    Mar 18, 2014
    Posts:
    138
    **HEARS CRICKETS**

    Hello.... anyone?
     
  7. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,061
    The fastest way to get the attention of Unity is to report a bug.

    I've also encountered this issue. It seems to be due to File IDs of sprites in sheets changing between Unity 2021.1 and 2021.2. I haven't seen this issue for single sprite assets. This causes references to these sprites to become missing or pointing to different sprites in the same sheet.

    Was able to reproduce the issue also by exporting a package in 2021.1 and then importing it in 2021.2.

    Reported a bug as case 1398401.
    @KalOBrien
     
  8. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,061
    I've manually fixed the sprites that got broken during the upgrade by getting their good File IDs from a previous version of the project in 2021.1 and then manually editing the meta files in the upgraded 2021.2 project. I checked the Git log for meta files that had "internalID"s changed during the upgrade to narrow down the potential files to fix.

    I deleted the "internalIDToNameTable" and "nameFileIdTable" fields to avoid them interfering and manually assigned the correct id to each sprite's "internalID".

    Looking at the changes and what is reported in the 2021.1 editor, it seems Unity broke the File ID assignment previously and the File IDs reported and used in the editor don't always reflect what's stored in the meta files. Unity 2021.2 then tries to fix the mess but does not always succeed – probably things were broken in ways Unity didn't fully anticipate.

    In 2021.2, Unity has added a new "nameFileIdTable" field, hopefully this will prevent issues like this in the future.
     
  9. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    1,061
    Well, turns out the method I used to narrow down potential files to fix was wrong and I missed some. So I finally decided to go brute-force and dumped the GUIDs, File IDs and names of all sprites from the project in 2021.1 and again from 2021.2, then sorted and and diffed the two files.

    This gave me a good overview of which File IDs changed and I could manually fix them, like described above. Then I could also re-dump from 2021.2 to check if I fixed the File IDs correctly.

    P.S: Unity uses the fixed File ID 21300000 for single sprites. So it should really only affect custom sprite sheets, where Unity needs to assign each sprite a different File ID.

    Update: The bug is now on the public issue tracker:
    https://issuetracker.unity3d.com/is...ets-created-in-earlier-versions-of-the-editor
     
    Last edited: Mar 9, 2022