Search Unity

Bug Asset Importing bug

Discussion in '2021.2 Beta' started by MP-ul, Aug 3, 2021.

  1. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    181
    Has any dev idea on when this is going to be fixed?
    Unity 2019
    upload_2021-8-3_17-57-12.png

    2021.2b5 default settings
    upload_2021-8-3_17-58-3.png
    2021.2b5 without that option checked upload_2021-8-3_17-58-42.png
     
  2. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    181
    Another model that is missing a leg because of this unity version upload_2021-8-3_18-1-34.png
     
  3. unity_Etienne

    unity_Etienne

    Unity Technologies

    Joined:
    Nov 28, 2019
    Posts:
    4
    Hi!
    A bug when using the option Remove Constant Scale Curve was present for a few versions before 2022.1.0a4 and 2021.2.0b6 when the fix landed (some meshes with constant scale animations were removed incorrectly).

    To fix the gun bone problem you need to have the Optimize Bones in Rig activated.
    upload_2021-8-6_14-33-55.png

    I'll also update this case : https://issuetracker.unity3d.com/is...-is-not-displayed-slash-displayed-incorrectly

    Hope this helps!
     
    MP-ul and richardkettlewell like this.
  4. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    181
    I will check it out soon.
     
  5. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    181
    Oh nice, that optimize bone option does work now.
     
  6. George-Ing

    George-Ing

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    38
    Hey MP-ul,

    Just been looking into this to make sure our upgrade code is correct. Looking into it, it does look correct, and the optimize bones flag should have been auto-enabled during the upgrade process to preserve the current functionality.

    I've run a few tests with your asset and the upgrade process does seem to work OK, so I just want to confirm that we're all good before closing your bug report (thanks for the report + project by the way - always helpful). So I'm wondering:
    • If you might have touched optimize bones after the upgrade, perhaps when trying to fix something else?
    • If you might have deleted a meta file OR re-added the asset to the project, at which point it would take the new functionality (optimize bones disabled), rather than following the upgrade path.
    • Something else that I might be missing?

    Thanks,
     
  7. MP-ul

    MP-ul

    Joined:
    Jan 25, 2014
    Posts:
    181
    Well I had to enable it. But when I did (enable it), it worked/it fixed the model, idk what's the problem since the early versions have no such thing but is beyound me. Though I am sorry I had little time to test things this month I put all my projects on pause because I need stable code for the shaders and I do no want to bother updating them everytime. Before, I did try to delete the meta file but nothing changed the model was still broken, when I upgraded to the unity version with the fix, I think I did double check to see if it works properly , I reimported a copy file, it was okay ,I deleted the meta file but it worked also okay.Only thing was that the option was off when I imported or reimported
     
  8. George-Ing

    George-Ing

    Unity Technologies

    Joined:
    Jan 14, 2020
    Posts:
    38
    Got it - thanks, that's a great help.

    So I'll give you a little context on that flag. The existing functionality we used in Unity was always to 'optimize bones' on import - this means removing any bones which aren't bound to vertices. This seems like a great idea, but it can mean that it's difficult to build a generic rig that you can swap between meshes - a fairly common use case.

    So in the latest version of Unity we exposed a flag to enable/disable auto-bone removal. For existing assets we auto-enable the flag on upgrade to ensure the asset is consistent with the previous Unity versions, but for new assets we have it disabled by default because we believe this is the best default use-case.

    The issue it sounds like you've hit up against is if you delete the meta-file or re-add the asset to the project then it's understandably treated as an entirely new asset, so it won't have the "optimize bones" enabled by default.
     
    LeonhardP and MP-ul like this.
unityunity