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

Compilation error with the latest versions of the 2D Animation and Entities packages

Discussion in '2D Experimental Preview' started by gamevanilla, Jun 16, 2020.

  1. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    When adding the latest versions at the time of this writing of the 2D Animation package (4.2.4) and the Entities package (0.11.0-preview.7) to a project, one gets the following compilation error:

    Library/PackageCache/com.unity.2d.animation@4.2.4/Runtime/TransformAccessJob.cs(196,62): error CS1061: 'NativeHashMap<int, TransformAccessJob.TransformData>' does not contain a definition for 'Length' and no accessible extension method 'Length' accepting a first argument of type 'NativeHashMap<int, TransformAccessJob.TransformData>' could be found (are you missing a using directive or an assembly reference?)

    I submitted a bug report (case 1255839), but just posting this here as well in case there is someone on the 2D Animation team reading the forums. The fix is trivial, so including it with the next version of the package would be very much appreciated.
     
    Tony_Max and GregoryFenn like this.
  2. GregoryFenn

    GregoryFenn

    Joined:
    Feb 13, 2018
    Posts:
    43
    There are loads of these bugs. I had one about the 2D Sprite Hybrid package where the code was using the dot operator on a void type. I do not understand HOW unity can release packages without even testing they work. I know bugs are to be expected for preview stuff but there is no excuse for the code they provide to not even compile in the first place.
     
    Tony_Max likes this.
  3. Zlino

    Zlino

    Joined:
    Feb 8, 2017
    Posts:
    1
    Were you able to fix it?
     
  4. resplendenttitanllc

    resplendenttitanllc

    Joined:
    Jul 8, 2020
    Posts:
    1

    log += "TransformData Count: " + m_TransformData.Length + "\n";


    Line 196 of TransformAccessJob "m_TransformData.Length" should be "m_TransformData.Count"

    Unfortunately far as I can tell, this file is immutable.
     
    Tony_Max likes this.
  5. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    You can actually change it locally on your project, but for some reason you will need to edit the file twice for the change to persist.
     
  6. gamevanilla

    gamevanilla

    Joined:
    Dec 28, 2015
    Posts:
    968
    Great news! This issue has a fix in review for version 5.0.1 of the 2D Animation package.