Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

2019.1 migration?

Discussion in '2D Experimental Preview' started by unity_OlQdonHqmJheWQ, Apr 19, 2019.

  1. unity_OlQdonHqmJheWQ

    unity_OlQdonHqmJheWQ

    Joined:
    Jun 14, 2018
    Posts:
    5
    After migrating to 2019 and updating all the packages I found dozens of strange errors like this:

    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)
    It seems like `SpriteSkin` requires a `SpriteSkinEntity` using `RequireComponent`, but the migration to the new package version (2.x) doesn't fix it, it just breaks everything.

    It also seems like you can't stay on the old version when you use Unity 2019 because the internal APIs have changed.

    Is there any plan for a migration path for this, or is it just 'tough luck, this is a preview package?'
     
  2. unity_OlQdonHqmJheWQ

    unity_OlQdonHqmJheWQ

    Joined:
    Jun 14, 2018
    Posts:
    5
    Just trying to be a bit more specific here.

    So, given this dependency list running in 2018.3:

    Code (CSharp):
    1.  
    2. {
    3.   "dependencies": {
    4.     "com.unity.2d.animation": "2.0.0-preview.2",
    5.     "com.unity.2d.ik": "1.0.8-preview.1",
    6.     "com.unity.2d.psdimporter": "1.0.0-preview.3",
    7.     ...
    8. }
    9.  
    Upgrading to 2019 results in:

    Code (CSharp):
    1.  
    2. There are inconsistent line endings in the 'Packages/com.unity.2d.animation/Tests/Editor/SkinningModule/CopyTest.cs' script. Some are Mac OS X (UNIX) and some are Windows.
    3. This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.
    4.  
    5. Library/PackageCache/com.unity.2d.common@1.0.11-preview.1/Runtime/InternalBridge/InternalEngineBridge.cs(1,32): error CS0234: The type or namespace name 'UIElements' does not exist in the namespace 'UnityEngine.Experimental' (are you missing an assembly reference?)
    6.  
    7. Library/PackageCache/com.unity.2d.common@1.0.11-preview.1/Runtime/InternalBridge/InternalEngineBridge.cs(33,43): error CS0246: The type or namespace name 'VisualElement' could not be found (are you missing a using directive or an assembly reference?)
    8.  
    9. Library/PackageCache/com.unity.2d.common@1.0.11-preview.1/Runtime/InternalBridge/InternalEngineBridge.cs(38,44): error CS0246: The type or namespace name 'VisualElement' could not be found (are you missing a using directive or an assembly reference?)
    10.  
    At which point you can't even launch the package manager, and are basically screwed.

    This can be worked around by deleting the entire `Library/PackageCache` folder temporarily, and then launching the package manager.

    Then you can upgrade to these versions:

    Code (CSharp):
    1. {
    2.   "dependencies": {
    3.     "com.unity.2d.animation": "2.1.0-preview.2",
    4.     "com.unity.2d.ik": "1.1.0-preview.1",
    5.    ...
    6. }
    Which generates this error:

    Code (CSharp):
    1. An error occurred while resolving packages:
    2.   Package com.unity.entities@0.0.12-preview.29 has invalid dependencies:
    3.     nuget.mono-cecil: Version [0.1.6-preview] is incompatible with the selected version [0.1.5-preview]
    4.  
    5. A re-import of the project may be required to fix the issue or a manual modification of /Users/doug/dev/now/relay-dev/unity-relay-titan/test.2019/Packages/manifest.json file.
    6.  
    ^ this is a dependency of 23 Animation 2.1.0

    ie. Long story short:

    - You don't appear to be able to use the 2.0.0 line on 2019
    - The 2.1.0 package is broken because it has an invalid dependency

    ie. Basically, you don't seem to be able to use this on unity 2019.
     
    AlanMattano likes this.
  3. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    623
    You can. Install cecil 0.1.5 and it will work.
     
    Scarafone likes this.
  4. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,065
    What is cecil 0.1.5 and how does one find it?
     
  5. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    104
    Hi, I have exactly the same issue. I have an animation made with Unity 2018. I upgrade everything to 2019 and I got
    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.  
    When I open the Awake function of Sprite skin, I have this weird lines of code
    Code (CSharp):
    1.         private void Awake()
    2.         {
    3.             spriteSkinEntity.enabled = false;
    4.             spriteSkinEntity.enabled = true;
    5.         }
    I installed, Entities and got another issue :
    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.  
    Please share your solution if you found one. Thanks
     
    Last edited: Apr 20, 2019
  6. kosted

    kosted

    Joined:
    Mar 14, 2015
    Posts:
    104
    Launch your package manager, search MonoCecil and install it
     
    kalamtech and Matt-K like this.
  7. MikaMobile

    MikaMobile

    Joined:
    Jan 29, 2009
    Posts:
    845
    So, can we migrate a project from 2018.3 to 2019.1 without a total meltdown? No luck over here.
     
    JoelGab likes this.
  8. unity_OlQdonHqmJheWQ

    unity_OlQdonHqmJheWQ

    Joined:
    Jun 14, 2018
    Posts:
    5
    I don't really understand why manually installing the conflicting dependency fixes anything, but at least that allows the package to compile.

    Back to the original problem:

    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.  
    4. NullReferenceException: Object reference not set to an instance of an object
    5. UnityEngine.Experimental.U2D.Animation.SpriteSkin.Awake () (at Library/PackageCache/com.unity.2d.animation@2.1.0-preview.2/Runtime/SpriteSkin.cs:74)
    6.  
    7. NullReferenceException: Object reference not set to an instance of an object
    8. UnityEngine.Experimental.U2D.Animation.SpriteSkin.Awake () (at Library/PackageCache/com.unity.2d.animation@2.1.0-preview.2/Runtime/SpriteSkin.cs:74)
    9.  
    It appears existing animations cannot be used with the upgraded package.

    Too bad so sad I guess, my fault for using an experimental preview. :(

    Incidentally, semantic versioning for developers:

    - 2.0.0 -> 2.1.0 indicates a non breaking upgrade that adds features.
    - 0.x.x is suitable for constant breaking changes.
    - A mandatory upgrade that breaks backwards compatibility should be tagged as 2.x.x -> 3.0.0.

    0/5 stars. Would not use again.
     
    Last edited: Apr 21, 2019
  9. MikaMobile

    MikaMobile

    Joined:
    Jan 29, 2009
    Posts:
    845
    I was actually able to migrate my project in the stupidest way I can possibly imagine. As a test, I took my 2018.3.11 project, removed the 2D animation and PSD import packages, and re-added them to see if this would break anything. Short answer, nope. Turns out, whatever metadata these packages use is NOT removed when the packages themselves are removed. So, armed with that info, I tried this:

    1) Before upgrading to 2019.1, I removed all packages from the project and hit "reset packages to default" for good measure.
    2) Upgraded this package-less project to 2019.1.
    3) Once in 2019.1, I installed the latest versions of the 2D animation and PSD importer packages, and was greeted by some errors because my project's scripting runtime version was still on .NET 3.5. I switched it to 4.0, and restarted unity.
    4) Success! Mostly. Errors were gone, my PSD's imported correctly and all of their old bones and skinning information was still intact. Yay! But none of my prefabs were animating anymore - the reference to the PSDs was broken. Fortunately, my project is still very simple so I was able to repair the prefabs by simply dragging new instances of the PSDs into position and I was done. The old animations played correctly, provided the names of the underlying transforms matched, and that was that.

    This experience is not confidence inspiring. Can we get some assurance that you're going to stop breaking S*** going forward? I read that these packages are supposed to exit preview status once we get to 2019.3, but are we going to get 2 more hideous transitions before that happens?
     
    Last edited: Apr 21, 2019
    MirkoVujnovic likes this.
  10. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    This is possibly due to you have a package that depends on on nuget.mono-cecil:0.1.5-preview and one of the 2D Animation package depedency (com.unity.entities) requires nuget.mono.cecil:0.1.6-preview. You will then have to indicate which version you want to use
     
  11. unity_OlQdonHqmJheWQ

    unity_OlQdonHqmJheWQ

    Joined:
    Jun 14, 2018
    Posts:
    5
    Dunno.

    The only packages I have installed are the default ones and the animation ones:

    Code (CSharp):
    1.  
    2. {
    3.   "dependencies": {
    4.     "com.unity.2d.animation": "2.1.0-preview.2",
    5.     "com.unity.2d.ik": "1.1.0-preview.1",
    6.     "com.unity.2d.psdimporter": "1.1.0-preview.1",
    7.     "com.unity.multiplayer-hlapi": "1.0.2",
    8.     "com.unity.package-manager-ui": "2.1.2",
    9.     "com.unity.timeline": "1.0.0",
    10.     "nuget.mono-cecil": "0.1.6-preview",   <---- WITH OUT THIS IT BREAKS
    11.     "com.unity.modules.ai": "1.0.0",
    12.     "com.unity.modules.animation": "1.0.0",
    13.     "com.unity.modules.assetbundle": "1.0.0",
    14.     "com.unity.modules.audio": "1.0.0",
    15.     "com.unity.modules.cloth": "1.0.0",
    16.     "com.unity.modules.director": "1.0.0",
    17.     "com.unity.modules.imageconversion": "1.0.0",
    18.     "com.unity.modules.imgui": "1.0.0",
    19.     "com.unity.modules.jsonserialize": "1.0.0",
    20.     "com.unity.modules.particlesystem": "1.0.0",
    21.     "com.unity.modules.physics": "1.0.0",
    22.     "com.unity.modules.physics2d": "1.0.0",
    23.     "com.unity.modules.screencapture": "1.0.0",
    24.     "com.unity.modules.terrain": "1.0.0",
    25.     "com.unity.modules.terrainphysics": "1.0.0",
    26.     "com.unity.modules.tilemap": "1.0.0",
    27.     "com.unity.modules.ui": "1.0.0",
    28.     "com.unity.modules.uielements": "1.0.0",
    29.     "com.unity.modules.umbra": "1.0.0",
    30.     "com.unity.modules.unityanalytics": "1.0.0",
    31.     "com.unity.modules.unitywebrequest": "1.0.0",
    32.     "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
    33.     "com.unity.modules.unitywebrequestaudio": "1.0.0",
    34.     "com.unity.modules.unitywebrequesttexture": "1.0.0",
    35.     "com.unity.modules.unitywebrequestwww": "1.0.0",
    36.     "com.unity.modules.vehicles": "1.0.0",
    37.     "com.unity.modules.video": "1.0.0",
    38.     "com.unity.modules.vr": "1.0.0",
    39.     "com.unity.modules.wind": "1.0.0",
    40.     "com.unity.modules.xr": "1.0.0"
    41.   }
    42. }
    43.  
    So if something depends on 0.1.5 and you depend on 0.1.6, it's because one of your core packages is broken.

    To be fair; I don't know why any of these packages are installed, but they're the default 2019 ones, I certainly didn't pick any of them.

    /shrug
     
  12. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    SpriteSkin requires SpriteSkinEntity component. It will be added automatically on add component or on psb reimport. Any other case you will have to add SpriteSkinEntity component manually.
     
    bearcoree and Stu_Pendous like this.
  13. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    436
    We sincerely apologies for the upgrading difficulty. We are still learning how to let our users try out the new features that we are still in development. This is not excuses for making mistakes but rather to seek your understanding and patience while we get better with our processes.

    As we are releasing these as Preview packages, there are certain limitations we still need to overcome. Thus we advice that these packages should not be used in your production but as a sneak peak on the features we are developing and help us shape these features that fulfill your needs. Nonetheless, we still welcome all feedbacks and issues posted by you and we will look into them as much as we can.

    Once again, thank you for your involvement in our preview journey and helping us to become better for you.
     
    Last edited: Apr 26, 2019
    Stu_Pendous likes this.
  14. MikaMobile

    MikaMobile

    Joined:
    Jan 29, 2009
    Posts:
    845
    I want to add that after further investigation, my biggest issue with migrating may have simply been that the package manager was no longer accessible in my project after updating to 2019.1. It wouldn't show up in the "windows" menu until I chose "reset packages to default", but after doing that and installing the latest packages, my existing PSB's weren't importing and their joints etc. were lost. For whatever reason, doing this in 2018.11 first avoided these issues.

    I'm eager to see these packages hit a fully released form so I can commit to using them. I fully understand why you don't want to worry about maintaining compatibility with prior versions until these tools "ship", so I won't be making much more with them until we get the green light. The trouble is, bugs/issues with these tools' workflow may only be apparent when used for real production work, so you may want to have a soft release at some point where changes/features may still be coming, but forward compatibility is committed to?
     
  15. JoelGab

    JoelGab

    Joined:
    Jul 17, 2018
    Posts:
    25
    We had written a custom render pipeline on unity 2017.3 and boy it has been a messy upgrade!

    Post-resolving 1000+ errors in shaders and in our custom render pipeline, everything is working great, except nothing opaque or transparent is being rendered, out sky pass, ui pass and Post-Processing pass is fine, but for some reason everything seems to be getting culled.

    My guess is its due to the drastic change in the render pipeline API, and just resolving errors and updating method calls, etc wasn't enough. Anyone who can point us to a guide on upgrading from the older render-pipeline API it would be much appreciated :)
     
  16. Matt-K

    Matt-K

    Joined:
    Sep 10, 2018
    Posts:
    79
    I had the incompatibility issue and this resolved it, thanks!
     
    klinetek likes this.
  17. klinetek

    klinetek

    Joined:
    Dec 1, 2016
    Posts:
    1
    Had the Same issue and Going into PacMan and Hunting down Cecil and picking a version (first i chose 1.5 and then when that gave no errors i installed the 1.6 with no errors as well) worked for me! thanks a lot for this kind of stuff.
     
  18. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    119
    When upgrading from 2019.1.0f to 2019.3.0f6 I also encounter the error: The type or namespace name 'Animation' does not exist in the namespace 'UnityEngine.Experimental.U2D'
    After installing MonoCecil through the nuget package manager in Visual Studio I still have the error. There's no MonoCecil in the Unity Package manager. It's just seems that SpriteSkin, SpriteSkinEntity and Animation are missing. Actually the complete UnityEngine.Experimental.U2D is missing. How would I go about fixing this?
     
  19. Cambesa

    Cambesa

    Joined:
    Jun 6, 2011
    Posts:
    119
    In the new Unity version it seems that the SpriteSkin, SpriteSkinEntity and Animation is moved from UnityEngine.Experimental.U2D.Animation to UnityEngine.U2D.Animation but I can not use SpriteSkinEntity anymore because the class is internal and inaccessible due to its protection level