Search Unity

DOTS and 2021.2 known issues

Discussion in 'Entity Component System' started by alexandre-fiset, Oct 15, 2021.

  1. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    I know about the notice on compatibility, but out of pure curiosity I've opened my big project in 2021.2 and everything seems to be working just fine. I also found in the release notes many mentions of Burst-related DOTS runtime fixes.

    I am now wondering, has anyone stumbled upon any showstopper issue with DOTS on 2021.2 ? And what was it?

    I have yet to test on consoles, but right now it doesn't seem like there's anything "not working" in Entities on 2021.2. It is in fact the smoothest Unity upgrade I did in years.
     
    quabug, bb8_1, Opeth001 and 6 others like this.
  2. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    967
    Interesting, keep us posted, I asked some time ago in Discord about higher versions but haven't got any good answers. I witnessed the same thing in 2021.1. It was working but haven't continued using it.

    I plan to upgrade myself for some time, 2020.3 is not a good version as I've posted often enough now. 2021.1 and 2 have some great improvements.
     
    bb8_1 likes this.
  3. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    Just tried updating my project and got
    basically appears to be the same as reported here https://forum.unity.com/threads/19a-datawatchservice.1120459/

    Fairly certain animation wont work without a new package release
     
    Egad_McDad, bb8_1 and apkdev like this.
  4. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Yeah was about to say i don't think animation package works.

    I've been using 2021.2b6 (I think i had some problems with b10 so I downgraded and haven't bothered upgrading since) for some libraries that won't be released for a while. Mostly because I wanted the upgraded uitoolkit runtime stuff.

    Yeah so this is just a weird practice by Unity atm. They including changes to the burst package in the release notes. You'll notice most (all?) of those fixes are in the burst changelog and exist in previous versions of Unity as well.
     
    bb8_1 and apkdev like this.
  5. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    967
    Tested my project in Unity 2021.2.0a12 as I don't have any other version installed currently.
    Got this error: https://forum.unity.com/threads/upg...reaks-projects-using-entities-0-17-0.1085774/
    Posted fix doesn't work so I just uncommented this part. Compilation works then.

    Everything seems to work fine in editor. Also the Build runs stable.

    Who uses the animation package? lol, seriously.

    I'm mainly interested in Burst, jobs and Entities. All seem to be compatible with newer Unity version. Not only is the communication a joke, even what IS communicated is one. :mad:
    There's a big difference of really unusable experimental packages being incompatible or EVERYTHING.

    So, not to make it sound like I'm angry about this. I'm quite happy that I can use a newer Unity version again!
     
    Last edited: Oct 15, 2021
    bb8_1, Anthiese and apkdev like this.
  6. Kmsxkuse

    Kmsxkuse

    Joined:
    Feb 15, 2019
    Posts:
    306
    If I remember correctly, the reason why I didnt move to 2021.2 myself was that Entities and UI Toolkit (the built in one in the new stable version) does not work together. Some assembly definition issue that even plagues 2020.3 occasionally.

    Burst and Jobs (and Collections) are all moving lockstep with even the Alpha build so there's no issue there.
     
    bb8_1 likes this.
  7. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Actually entities, UI toolkit and input system seem to work perfectly together in 2021.2 now, which is why I moved some experimental libraries to it.
     
  8. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    967
    @tertle Can you take a look at the Entities DOTS editor and see if you can open DynamicBuffers? I can open the list of buffer items but then I can't open buffer items itself.
    Also the hover from the entities itself in the overview seems missing.
    I'm using the latest version now, 2021.2.0b16.
     
    bb8_1 likes this.
  9. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    upload_2021-10-16_15-1-11.png

    Seems fine? Though a bit different from 2020.3
     
    Last edited: Oct 16, 2021
    bb8_1 and Enzi like this.
  10. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    967
    Thanks, @tertle. I have Odin installed, maybe that's interfering.
     
    bb8_1 likes this.
  11. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    967
    I don't have this issue in 2021.1.25f1, must be UIToolkit related I guess.
     
    bb8_1 likes this.
  12. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    That's amazing guys!
    Thanks for sharing these news I'm very interested in using new URP stuff which are only available in unity 2021.1+
    I'll try the new unity versions with DOTS and hope to not encounter weird bugs.
     
    bb8_1 likes this.
  13. bb8_1

    bb8_1

    Joined:
    Jan 20, 2019
    Posts:
    100
    This is all great news - pls continue to report your findings - and @UnityOfficials if you plan(or what ever that plan is) to add dots support to current / future LTS unity versions only please say so - break this inexplicable silence
     
    Kmsxkuse likes this.
  14. vectorized-runner

    vectorized-runner

    Joined:
    Jan 22, 2018
    Posts:
    398
    Does Hybrid renderer work in 2021? Last time I tried I couldn't fix the errors or when I did nothing was rendered (it had something to do with SRP batcher)
     
    bb8_1 likes this.
  15. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    285
    I've been using Entities 0.16/0.17 + HDRP + HRv2 with Unity 2021.2.0b14 without any major issues. The biggest problem was ensuring that all shaders/materials used in subscenes are compatible with HRv2. There seems to be a bug that if any shaders are incompatible, rendering breaks completely and the entire scene becomes one giant rendering artifact. This includes the error shader, which means that my entire scene keeps blinking in and out of existence while shaders are compiling. Oh well. I can live with that for now, though.

    If you need to fix your scenes, the warnings logged in the console are useful for finding offending materials.

    One other issue I have is that (some? all?) lights from subscenes don't seem to render in build - still need to investigate that though, could be my own fault.

    (Not actually sure if any of those problems are 2021-specific)
     
    Luxxuor and bb8_1 like this.
  16. herkip

    herkip

    Joined:
    Dec 21, 2013
    Posts:
    30
    @Enzi I am having the same issue with and without Odin. Some buffers are already expanded and others are not. And expand button is greyed out. @tertle Did you try with a component that has multiple fields?
     
    ildarshara and bb8_1 like this.
  17. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    in my case, I use my own hybrid renderer which is more suited to my Game Style (TOP DOWN).
    Additionally, it looks like Unity is focusing more on DOTS in its hybrid renderer than actual performance.
    one of the reasons I said this is:
    they do Frustum Culling using DOTS (CPU), which leads to useless data transfer of survived renderers from CPU to GPU on every frame.
     
    Egad_McDad and bb8_1 like this.
  18. bb8_1

    bb8_1

    Joined:
    Jan 20, 2019
    Posts:
    100
    I read discord(unity / dots) some dev ported his project(dots) to 2022.1 and it works - i tried 2021.2 (simple urp - dots app) and it works except that when i exit unity it crashes for some reason otherwise it works fine (maybe problem is in materials as above in some posts is reported)
     
    Last edited: Oct 26, 2021
    andreiagmu likes this.
  19. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    @MartinGram @Joachim_Ante

    Half a year later, do we know if we still should stick to 2020.3 LTS when using DOTS? Our current tests show nothing wrong with using the runtimes on 2021.2, the only thing holding us back is the unfamous notice on compatibility.

    We'd like to have FidelityX / DLSS, but more importantly Skinned Mesh support for VFX graph. These only are available in 2021 tech stream. Our game has been delayed to Q3-Q4 2022 and we wonder if we could safely jump to 2021.2 or not.

    If you can't say anything, when should we expect news? This year? Early next year? Still undetermined?

    Any update would be greatly appreciated.
     
  20. IAL

    IAL

    Joined:
    Nov 11, 2016
    Posts:
    7
    We just tried updating to 2021.2 on a separate copy of our project that uses a mix of classic GameObjects and Entities. Things work ok in the editor but there are AOT errors with the Entities package in the Windows build (x64, IL2CPP). I'd recommend trying to upgrade on a copy of your project. But be warned that it will most likely fail, if not in the editor then almost certainly in a build.
     
  21. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    What if you don't use IL2CPP? I didn't see anyone else mentioning it before.
     
  22. eggsamurai

    eggsamurai

    Joined:
    Oct 10, 2015
    Posts:
    115
    yes...everything is ok, include il2cpp, but we use entity & physics package (query) only. Hybrid renderer v2 is broken and low performance.
     
    Krajca likes this.
  23. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    We have no such error and things are working fine on Windows 64 and Mac (Intel and Silicon). Our project is big (~300 gb of data) but uses nothing else than Entities (no Hybrid Renderer, no DOTS animation or physics). Still, we haven't tried on console and I'd also advice trying with a copy of your project (or a project with version control like ours).
     
  24. apkdev

    apkdev

    Joined:
    Dec 12, 2015
    Posts:
    285
    Was that using IL2CPP?

    I've had issues building with IL2CPP - the game seemingly compiles correctly, but some of the subscene files are missing/corrupted when the player launches. I'm sticking to Mono builds for the near future, these seem to work just fine.
     
  25. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
    Yes but I do not use subscenes so that may explain it ;)
     
    apkdev likes this.
  26. IAL

    IAL

    Joined:
    Nov 11, 2016
    Posts:
    7
    It is definitely possible that the method throwing up AOT errors is actually defined in the Hybrid Rendering package as an extension method. Unfortunately we do need Hybrid Rendering so we'll probably just wait for things to be fixed
     
  27. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    226
    Just updated to 2022.1.15a and Unity.Rendering seems to be missing along with RenderMeshDescription and RenderMeshUtility.
    It was working until a13 (ECS + HR2 + very little of Physics)
     
  28. beevik_

    beevik_

    Joined:
    Sep 27, 2020
    Posts:
    101
    Fascinating. This is just me reading tea leaves, but it certainly suggests something new and different is going to be replacing hybrid rendering.
     
  29. scottjdaley

    scottjdaley

    Joined:
    Aug 1, 2013
    Posts:
    163
    According to this, there is a new hybrid renderer coming: https://github.com/Unity-Technologies/Graphics/pull/5842
     
  30. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    Oh, this is a most interesting find, sir!
    Technical changes
    • Hybrid Renderer V1 has been completely removed, and ifdefs related to it have been removed. The name "Hybrid V2" is also removed. Going forwards, there will only be a single Hybrid Renderer (the third version, but not called "V3").
    • Shader macros have been refactored to eliminate the workaround for a bug in the fxc preprocessor. The new macros are simpler and easier to use as a result, and will only work with the new caching preprocessor which is nowadays enabled by default.
    • A number of built-in shader properties in DOTS instancing variants have been migrated from DOTS instanced properties to efficiently encoded constant buffer constants set up by dedicated SRP Batcher C++ code. This saves a significant amount of GPU memory and should also be faster.
    • The DOTS instancing metadata constant naming format has been changed to avoid double underscores occurring. This fixes a problem on Nintendo Switch which emits compiler warnings when such names are encountered.
    • The UnityPerDraw cbuffer is not defined anymore with the DOTS_INSTANCING_ON variant. BatchRendererGroup doesn't need it anymore and it's not even bound.
    • Fixed shader compilation errors related to previous matrix definitions with the DOTS_INSTANCING_ON variant. Hybrid Renderer had not support for Unity 2021 and the Hybrid Renderer/SRP CI has been disabled for the whole 2021 cycle. It comes at no surprise that the DOTS variant was broken at some point, so we fixed that.
    • Enabled LOD fade variants for DOTS instanced HDRP Shader Graphs, for which they were disabled. BatchRendererGroup is now able to support it, and a future version of Hybrid Renderer will implement it (but does not currently do so).
     
    Antypodish, NotaNaN, Krajca and 3 others like this.
  31. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    226
    Interesting, I hope we get to test it in the very near future.


    I wonder why are they still calling it "hybrid" rendering. The idea of a fully DOTS (and thus "pure") game is quite silly to begin with.
    What would be the point in making a "DOTS main menu", "DOTS settings menu", "DOTS <insert any silly non-gameplay related component that any game must have>". Game objects rendering some things here and there won't go away even in a heavy ECS/DOTS game.
     
  32. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Because it still uses mesh and material. A pure implementation would do away with these.

    As per your menu, well if you use uitoolkit you don't use game objects for your ui either (except the base document file)
     
    Last edited: Nov 21, 2021
  33. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    226
    What? rendering without a mesh and without a material is pretty much not rendering at all. The only thing that may comply with that statement of yours is maybe mesh shaders with no textures?

    Rendering is rendering, it doesn't matter if the programmer/developer "sees" it as a mesh and material in a game object or as a mesh and material in an "entity". Some engine internal code to handle gpu upload, etc might be different between them but it is still fundamentally the same logic, cull, batch, upload, render.
     
  34. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    He's referring the "Material" and the "Mesh". Those are managed classes.

    Its true that those can be represented differently, but that requires custom editor logic and engine changes.
     
    Anthiese likes this.
  35. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    Which is probably why this mystery incompatibility is happening right now, although that don't really explain why they need to keep it a secret...
     
    Anthiese and exiguous like this.