Search Unity

I cannot figure out what this error message means

Discussion in 'Editor & General Support' started by zapes_tv, Jun 5, 2020.

  1. zapes_tv

    zapes_tv

    Joined:
    Jun 5, 2020
    Posts:
    4
    Library/PackageCache/com.unity.2d.animation@3.2.2/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?)
     
  2. The chance is that you are either missing a package which is needed by this animation package (see the dependencies in the package manager), or you have different versions or you have the wrong Unity version. Check the package dependencies, make sure you have all of the dependencies and the right versions and if you do, head over the 2D forum, where the 2D experts are. :)
    https://forum.unity.com/forums/2d.53/
     
  3. Matt_De_Boss_Developer

    Matt_De_Boss_Developer

    Joined:
    Oct 17, 2014
    Posts:
    46
    I have the same exact error. Still haven't figured it out.
     
  4. Bouhtouch

    Bouhtouch

    Joined:
    Dec 19, 2014
    Posts:
    3
    hi there I have the same issue, I just installed the "2D Animation" package using the Package Manager and it doesn't highlight any dependency issue.
    edit: I'm using unity 2019.4 LTS
     
    enriqueflores likes this.
  5. Bouhtouch

    Bouhtouch

    Joined:
    Dec 19, 2014
    Posts:
    3
    sorry for the double post but I found a "fix". As this stackoverflow user points out, downgrading the Jobs package from 0.2.10 to 0.2.9 solves the issue.
    Warning: if you're using Entities and Hybrid Renderer you'll need to downgrade also those packages as their last version requires the latest Jobs package.

    I think this is to be expected as these are preview packages and they're probably already flooded with bug reports ;P
     
  6. cdw0424

    cdw0424

    Joined:
    May 11, 2018
    Posts:
    4
    Thank you!!!!!!!!!!!!!
     
  7. hridpath

    hridpath

    Joined:
    Jan 28, 2017
    Posts:
    16
    NativeHashMap<TKey, TValue> in Unity.Collections does not have a Lenth property. Use the Count() method instead.

    You can edit the TransformAccessJob.cs file in your {project} \Library\PackageCache\com.unity.2d.animation@3.2.3\Runtime\TransformAccessJob.cs file Line 196. Change Lenght to Count().
     
  8. patrickjarnfelt

    patrickjarnfelt

    Joined:
    Jun 24, 2013
    Posts:
    28
    Regardless of what version of Unity and the 2D animation package I use, I get this error. Manually changing it to Count() is a really bad solution since any change refreshes the Package Cache and overwrites the changes we make to it. This should really be fixed by Unity!!!
     
  9. mochakingup

    mochakingup

    Joined:
    Apr 14, 2014
    Posts:
    212
    Came across this as well, using Unity 2019.4, 2D animation package version 3.2.3
    Unfortunately downgrading the Jobs to 0.2.9 doesn't seem to solve the issue anymore.
     
  10. kamilpyggdrasilgaming

    kamilpyggdrasilgaming

    Joined:
    Aug 2, 2019
    Posts:
    3
    Hi,
    I have the same error.
    I'm using 2019.4.0f1 LTS Pro.

    I downgraded Jobs to 0.2.9, and all dependencies, but it did not work out for me.

    I ended up downloading Unity 2019.3.12f1 and it works fine.
     
  11. Shack_Man

    Shack_Man

    Joined:
    Jun 7, 2017
    Posts:
    372
    Same here... I was quite excited to use bone animation with the jobs system, but looks like it will have to wait.
     
  12. elephantasy

    elephantasy

    Joined:
    Apr 19, 2015
    Posts:
    1
    I change m_TransformData.Length to m_TransformData.Count() and it works.

    TransformAccessJob.cs 196
     
  13. sergiocarneiro

    sergiocarneiro

    Joined:
    May 9, 2015
    Posts:
    2
    According to the Collections package v0.9 changelog:
    Downgrading to v0.8 solves the issue. We'll have to wait for the package to be updated to support `Count()`.
     
  14. vetasoft

    vetasoft

    Joined:
    Nov 15, 2013
    Posts:
    432
    kind of boring to change every package update the 2D animation transformaceessjob.cs line m_TransformData.Length to m_TransformData.Count().


    Hope there will be a fix soon for that, this issue is very annoying for our team.
     
  15. lewisjet

    lewisjet

    Joined:
    Apr 27, 2020
    Posts:
    9
    Update to the newest version for the 2D Animation Package- that worked for me!
     
  16. vvladd

    vvladd

    Joined:
    Jan 17, 2020
    Posts:
    1
    Thank you. It was working also for me.
     
  17. logicandchaos

    logicandchaos

    Joined:
    May 16, 2016
    Posts:
    26
    I have this error myself, trying project tiny for the 1st time. Unity version 2019.4.10f1 I updated to the newest animation version 3.2.5 and the error went away! Thanks lewisjet
     
  18. QuariYune

    QuariYune

    Joined:
    Jul 1, 2021
    Posts:
    20
    Basically the same issue with Entities 1.0.0-pre.15 and 2D animations. With the updated collections package that "Count()" property has now turned into just "Count" in the TransformAccessJob.cs. Can we get another update to the 2D animations package to fix this one?

    Versions:
    Collections 2.1.0-pre.2
    2D Animation 9.0.1

    Entites 1.0 depends on Collections 2.1.0-pre.2.

    Edit: Also happening with 2D PSD Importer 8.0.2