- Home /
NativeHashMap missing in 2021?
I just tried to use code from an older project in a newly setup and empty Unity project, using the currently newest non-beta version 2021.1.7f1. When trying to recreate the old 'Package Manager' setup, I noticed, that some ECS-packages like Unity-Jobs and Unity-Collections were missing. I checkt in a short test-script, if this were now integrated and it seemed to work fine (I could use for example an IJobParallelFor-interface without compile issues).
But when importing my old code, the "NativeList<>" and "NativeHashMap<>" classes, that once were part of the Unity-Collections package, seem to no longer exist in this package (while the "NativeArray<>" works still fine). In Unitys documentation I could not find any flags, that these were obsolete. :/
My question now is: How can I get the 'old' Unity-Collections-Package back when it is now native integrated (but missing parts) or is there any alternative for a NativeHashMap<> I had overlooked.
Thanks for your help :)
Answer by Llama_w_2Ls · May 19, 2021 at 01:54 PM
If you install the ECS package from the package manager, you should have access to Unity.Jobs and Unity.Collections. However, from Unity 2020 and onwards, preview packages are no longer visible from the package manager, but can still be installed.
In the top left corner of the package manager, there is a plus sign - click it and press install from github repo_ (or something like that). Then type in com.unity.entities
. This installs the ECS entities package, alongside the required namespaces. It may take a while. Hope that works @Skully777
Thank you very much :) Your suggestion worked wonderfully.
A bit of a strange approach tho. Would be great to find changes like this in the official documentation of these features.
A last comment if someone has some similar issues. In the version I'm using right now, the setting from the plus menu to solve this is called "Add package by name..." :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613033936im_/https://answers.unity.com/themes/thub/images/avi.jpg)