I am trying to install the latest entities and hybrid renderer in my project under Unity 2022.1.0f1 and get these errors:
Library/PackageCache/com.unity.entities@0.50.1-preview.2/Unity.Entities.Editor/ProfilerModules/StructuralChangesProfilerModule+View.cs(36,13): error CS0104: ‘TreeView’ is an ambiguous reference between ‘Unity.Editor.Bridge.TreeView’ and ‘UnityEngine.UIElements.TreeView’
Library/PackageCache/com.unity.entities@0.50.1-preview.2/Unity.Entities.Editor/SystemSchedule/TreeView/SystemTreeView.cs(18,27): error CS0104: ‘TreeView’ is an ambiguous reference between ‘Unity.Editor.Bridge.TreeView’ and ‘UnityEngine.UIElements.TreeView’
Library/PackageCache/com.unity.entities@0.50.1-preview.2/Unity.Entities.Editor/ProfilerModules/MemoryProfilerModule+View.cs(57,13): error CS0104: ‘TreeView’ is an ambiguous reference between ‘Unity.Editor.Bridge.TreeView’ and ‘UnityEngine.UIElements.TreeView’
Library/PackageCache/com.unity.rendering.hybrid@0.50.0-preview.44/Unity.Rendering.Hybrid/HybridV2RenderSystem.cs(70,23): error CS0234: The type or namespace name ‘HybridV2’ does not exist in the namespace ‘Unity.Rendering’ (are you missing an assembly reference?)
Library/PackageCache/com.unity.rendering.hybrid@0.50.0-preview.44/Unity.Rendering.Hybrid/TrackShaderReflectionChangesSystem.cs(8,23): error CS0234: The type or namespace name ‘HybridV2’ does not exist in the namespace ‘Unity.Rendering’ (are you missing an assembly reference?)
Library/PackageCache/com.unity.rendering.hybrid@0.50.0-preview.44/Unity.Rendering.Hybrid/HybridV2Culling.cs(237,28): error CS0246: The type or namespace name ‘BatchVisibility’ could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.unity.rendering.hybrid@0.50.0-preview.44/Unity.Rendering.Hybrid/HybridV2Culling.cs(258,66): error CS0246: The type or namespace name ‘BatchVisibility’ could not be found (are you missing a using directive or an assembly reference?)
Are these two packages not compatible with 2022.1? If they are, what can I do to fix these errors?
Yeah, I realized that after posting. DOTS and 2022.1 don’t mix at all, apparently. That is, every version of the Entities package produces errors in 2022.1. Just finished installing 2020LTS… let’s see if my project works with that.
DOTS jobs and burst should work on 2022. As far I am aware. But not latest 0.50 entities.
I think it also applies to 2021.
Someone please correct me, if I am wrong.
But if you can stick with Unity 2020, while needing 0.50 entities, that is your best shot.
If 2020 is too much of a downgrade, the next Entities release (0.51 I think) is supposed to be narrowly focused on bring it into the 2021 cycle, so if its needing painful rework, it might be reasonable to just wait. The language Unity uses around 0.51 makes it sound like they wanted it to be quick after 0.50, and that was a couple months ago so it might be soon.
Also, 2020.x is a terrible experience on Linux for some reason. With Entities 0.17, I was able to use 2021.x and it had relatively minimal issues, but having to revert my projects back to 2020.x has been a huge kick in the sack.
For that matter surely there is a safe set of packages to provide DOTS features in each version of Unity… So why doesn’t the package manager have a way to adopt a stable working DOTS enabling set of packages?
It’s a preview package. When you manually enable the use of preview packages and install them, you take on the responsibility of reading the documentation for proper usage with the understanding that they are not yet complete, so features may/will be missing/not implemented yet, such as compatibility notices.
You can move a package out from the Library folder to the Packages folder to make changes persist. It wouldn’t surprise me if there were only a couple of things needed to make Entities work in 22.1. However, the Hybrid Renderer won’t work in 22.1 due to BRG being rewritten. Current DOTS is compatible with the two most recent LTS versions. So use one of those.
i am still getting namespace conflicts with the
Library\PackageCache\com.unity.entities@0.51.1-preview.21\Unity.Entities.Editor\SystemSchedule\TreeView\SystemTreeView.cs(18,27): error CS0104: ‘TreeView’ is an ambiguous reference between ‘Unity.Editor.Bridge.TreeView’ and ‘UnityEngine.UIElements.TreeView’
this error , when trying to add package “com.unity.entity”