Search Unity

Unity 2019. Package manager unable to export correctly animation2D

Discussion in 'Package Manager' started by kosted, Apr 18, 2019.

  1. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    93
    Hi all,
    I updated my unity to the last version 2019.1.0f2, but I got this error :
    Code (CSharp):
    1. Library\PackageCache\com.unity.2d.animation@2.1.0-preview.2\Runtime\PrepareSkinningSystem.cs(19,32): error CS0029: Cannot implicitly convert type 'Unity.Entities.ComponentGroup' to 'Unity.Entities.EntityQuery'
    2.  
    3.  
    When I remove Animation 2D I don't have errors.
    I could I correct it please ?
     
  2. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    53
    Hi @kosted,

    I'm not sure what's causing that error, I tried adding
    com.unity.2d.animation@2.1.0-preview.2
    to an empty project in 2019.1.0f2 and I didn't get any errors. You might have to clear your cached version of that package i.e. delete the folder
    com.unity.2d.animation@2.1.0-preview.2
    under
    <my-project>\Library\PackageCache\
    and try adding the package again.
     
  3. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    93
    Hi @samuelb_unity,
    I created a new project. I did not have these errors, but when I import my project, my animation sprite lost all bones.
    Do you know how to correct it ?
     
  4. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    53
    Are you still seeing errors from the
    2d.animation
    package when you open your original project? If not, this doesn't seem like a Package Manager issue, you might be better off asking in the 2D forum https://forum.unity.com/forums/2d.53/
     
  5. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    93
    Yes, it is now another 2d.animation issue :
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEngine.Experimental.U2D.Animation.SpriteSkin.Awake () (at Library/PackageCache/com.unity.2d.animation@2.1.0-preview.2/Runtime/SpriteSkin.cs:74)
    3. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    4.  
    5.  
     
  6. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    93
    I re install Unity 2019, install once again 2D animation, IK and Entities, but still got
    Code (CSharp):
    1. Library\PackageCache\com.unity.2d.animation@2.1.0-preview.2\Runtime\DeformSpriteSystem.cs(19,9): error CS0619: 'ComponentGroup' is obsolete: 'ComponentGroup has been renamed to EntityQuery. (UnityUpgradable) -> EntityQuery'
    2.  
    I'm tired of doing the same process during one week without success. I deleted the cache folder also...Nothing
     
  7. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    93
    I let unity opened, then I delete the folder com.unity.2d.animation, and i get rid of the errors.
     
  8. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    93
    When I closed Unity and Opend it again, all of the errors are back...It's tiring
     
  9. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    53
    Hi @kosted,

    I think I see what's happening. You shouldn't manually install the
    entities
    package because it is already a dependency of
    com.unity.2d.animation
    (you can see this in the Package Manager window, click Advanced -> Show dependencies). You'll notice that
    2d.animation
    has a dependency on
    0.0.12-preview.29
    of
    entities
    whereas installing the latest version of entities directly will get you version
    0.0.12-preview.30
    (which for me introduces the errors you mentioned).

    When you install a package directly, that version will override the version needed by other packages in your project so you end up with a combination of packages that don't work together.

    In summary, just add
    com.unity.2d.animation
    and
    com.unity.2d.ik
    to your project (you'll notice
    entities
    still ends up in your Project window under Packages because it's a dependency of
    2d.animation
    ).
     
  10. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    93
    HI @samuelb_unity you are right. So reinstall Unity from scratch, install only
    com.unity.2d.animation and com.unity.2d.ik in a new fresh project. I didn't install now Unityand everything works fine. Thank you very much.