Compile errors in Unity 2022.1.0f1 with entities 0.50.1 & hybrid renderer 0.50.0

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?

0.50 is for 2020.3 only, as stated in the manual:
https://docs.unity3d.com/Packages/com.unity.entities@0.50/manual/install_setup.html

2 Likes

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.

1 Like

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.

Hope so because it’s a bit crap stuck in 2020 if you’re invested in a lot of the URP changes in 2021.2+

3 Likes

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.

2 Likes

They said Q2, they have 3 weeks left…

I was recently informed that Unity only really supports Linux from 2021.2 and beyond. Makes me sad.

The thing is why doesn’t the Entities package throw up an incompatibility error/warning in Package Manager or Editor?

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?

The thing is this bug should be fixed all it takes is one line of code…

using TreeView = UnityEngine.UIElements.TreeView;

Tried adding it and Unity keeps resetting the Package cs files to default!!!

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.

So it’s a know problem point that was first posted about in June surely there will be a work around for it by now?

I don’t know what to tell you about that. The workaround is to use a compatible version?

2 Likes

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.

1 Like

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”