Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Discussion Experimental Entities 0.51 (for Unity 2021) is available

Discussion in 'Entity Component System' started by Antypodish, Jun 16, 2022.

  1. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,574
    For careful readers and update trackers, Experimental Entities 0.51 for Unity 2021 has been released.
    It is expected to work for Unity 2020 also.
    :D:cool::eek::rolleyes:

    upload_2022-6-16_6-34-42.png

    upload_2022-6-16_6-35-18.png

    We may expect Unity officials soon, to announce this.
    Edit: See official thread.
    Experimental Entities 0.51 is Available
     
    Last edited: Jun 22, 2022
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    3,983
    Why do you say 2021 only? The docs seem to suggest it also works with 2020. Haven't tried it yet personally, but it shows up in pacman in my 2020 project.
     
    Krajca, Antypodish and Anthiese like this.
  3. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    It ran fine for me in 2020.3. Upgraded entities before I upgraded Unity versions.
     
    Last edited: Jun 16, 2022
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,574
    Well I perhaps misworded that.
    I wanted appoint more, that it is not for 2022, so people won't get confused.
    Thx for pointing out. I removed ONLY key word.
     
    DreamingImLatios likes this.
  5. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    327
    Thanks for the heads up!
     
  6. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    327
    EDIT: If at first you don't succeed: Refresh... refresh.... refresh... wait... refresh AND VIOLA! It works now for me at least :)

    ~~Interestingly Collections for LTS21 4f1 does not have a 1.3.1 version I wonder if I need to download that with 2020 first.~~
     
    Last edited: Jun 16, 2022
  7. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
    It has suprisinly few changes in the changelog.
     
  8. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    272
    Its main purpose is compatibility with 2021
     
  9. desper0s

    desper0s

    Joined:
    Aug 4, 2021
    Posts:
    14
    Upgrading to 0.51 on 2020.3 is very easy, if you have any problem with collections, just add com.unity.collections separately in "Package Manager" (they added some kind of migration from "NativeHashMap" to "NativeParallelHashMap" which is nice it worked automatically for me). When upgrading to 2021.3 make sure that you are using 2021.3.4f, on 2021.3.1f I've had compilation issues.
     
  10. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    I advice against upgarding to 0.51 at the moment. There are a lot of breaking issues atm - il2cpp doesn't work, constant code gen issues on code change requiring editor restarts etc.
     
  11. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    327
    YEP! Agreed! I would recommend getting a feel for Unity 2021, as the editor has some changes to it. But over all, adding entities makes it a pretty quick way to halt progress at the moment of trying it out Sadly.
     
  12. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    281
    I have 20% more ms in my performance tests.
    Do you think I should report it as a bug?
    I mean is everyone seeing the same thing?
    I updated from 0.17
     
  13. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    908
    I'm seeing the same numbers in my stress test scene.
    As Tertle has already mentioned, builds are broken. I'm getting
    Code (CSharp):
    1. ExecutionEngineException: Attempting to call method 'Unity.Entities.FastEquality+CompareImpl`1[[Unity.Physics.PhysicsWorldIndex, Unity.Physics, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]::CompareFunc' for which no ahead of time (AOT) code was generated.
    2.   at Unity.Entities.FastEquality.Equals (System.Void* lhsPtr, System.Void* rhsPtr, Unity.Entities.FastEquality+TypeInfo typeInfo) [0x00000] in <00000000000000000000000000000000>:0
    3.   at Unity.Entities.FastEquality.Equals[T] (T& lhs, T& rhs, Unity.Entities.FastEquality+TypeInfo typeInfo) [0x00000] in <00000000000000000000000000000000>:0
    4.   at Unity.Entities.TypeManager.Equals[T] (T& left, T& right) [0x00000] in <00000000000000000000000000000000>:0
    5.   at Unity.Entities.ManagedComponentStore.FindSharedComponentIndex[T] (System.Int32 typeIndex, T newData) [0x00000] in <00000000000000000000000000000000>:0
     
    bb8_1 and EugenyN1 like this.
  14. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    219
    Mmmm my entities spawned from a converted prefab stopped rendering but converting a GO of that prefab to an entity using the editor makes it render as it should.
    Any hint/idea/pointer u can think of?
     
  15. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    908
    Check for differences in the entity inspector.
    Sounds like another bug though if it worked previously.
     
  16. Thermos

    Thermos

    Joined:
    Feb 23, 2015
    Posts:
    148
    Have you tried select IL2CPP build type to Faster(Smaller) Build??
    I use ECS0.17 in Unity 2021 and solved it.
     
  17. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    283
    Is this compatible with deferred lighting?
     
  18. mikaelK

    mikaelK

    Joined:
    Oct 2, 2013
    Posts:
    281
    I had jobs debugger on. Thats why the 20% perf hit. That or restarting unity fixed.
    Need to do more testing but my first build went tough and started without problems.
     
  19. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,218
    It's not ideal, but I just went into Temp folder, deleted the generated code folder, recompiled, and it was 'fixed', at least until the next time it occurs.

    Just a possible, slightly more simple remedy for the time being.
     
    shotoutgames likes this.
  20. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    283
    Did same
    And errors gone for now. Let us pray
     
    MostHated likes this.
  21. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,008
    Is there a sample project for entities 0.51 somewhere ?
     
  22. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,574
    koirat likes this.
  23. TieSKey

    TieSKey

    Joined:
    Apr 14, 2011
    Posts:
    219
    To answer my problem and let u know of what's happening.

    I was incorrectly setting the "RenderingLayerMask" which never actually worked up until 0.50/0.51. My defect manifested as a fault once the feature was actually implemented.
     
  24. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'm patient and will probably actually just wait for the ultra radioactive 1.0 which will set fire to my code! That is what we sign up for this soon I guess. Thanks for the heads up though as restarting editor is a bit tiring :D
     
  25. Armitage1982

    Armitage1982

    Joined:
    Jul 26, 2012
    Posts:
    37
    Thanks for the information. What I've read so far is along those lines.

    I wonder if by then we won't see a Unity Editor in two different flavors.
    One of which would fully embrace the ECS pattern.
    It smells like a rewrite from scratch.
     
  26. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    For sure we will not, according to Unity. The conversion workflow is what Unity has decided for this 1.0
     
    Krajca likes this.
  27. TaoArena

    TaoArena

    Joined:
    Nov 6, 2019
    Posts:
    2
    Hello,

    I'm trying to use entities 0.51 in 2021.3.4f1 LTS on webGL, but I'm getting a missing assembly reference:

    Code (CSharp):
    1. (0,0): error System.TypeLoadException: Could not load type 'Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle' from assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
    How can I fix this? I know entities 0.51 does not officially support webGL, but 0.17 is doing the job just fine on 2020 LTS. So I'm still holding out :D

    Thanks!
     
  28. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Do you mean hybrid renderer? WebGL lacks the hardware support to use it.
     
  29. TaoArena

    TaoArena

    Joined:
    Nov 6, 2019
    Posts:
    2
    No, we're using it just for the job system. I guess the compile error might stem from the renderer as well, but it seems it's part of the CoreModule. Once I upgrade to 0.51, the above error pops up.
     
  30. elliotc-unity

    elliotc-unity

    Unity Technologies

    Joined:
    Nov 5, 2015
    Posts:
    228
    I don't think webgl has parallel jobs anyway, so if you only want jobs, you might be disappointed. (But also, jobs doesn't need entities, so if you only want jobs, you may not want entities at any version.)
     
  31. rauiz

    rauiz

    Joined:
    Mar 19, 2013
    Posts:
    40
    The part about jobs not needing entities is true and a pretty awesome thing (have an ongoing project that does that). It'd also be nice if BlobAssets weren't inside the Entities packages. I feel like they are useful enough that I'd want to use Blobs + Jobs + Burst without ECS in a number of situations. Maybe they could live inside the Collections packages...
     
  32. Armitage1982

    Armitage1982

    Joined:
    Jul 26, 2012
    Posts:
    37
    Just a little feedback to say that I took a chance and updated my project from Entities 0.17 to 0.51.

    A big thank you to @tertle for his help on Discord, he is a good adviser.

    The main difficulty I had was that I first updated the packages before following the update guide, it seemed like a no-brainer before modifying the sources. I didn't necessarily expect to have to remove packages like the DOTS Editor and the hundreds of errors that came with it were unclear.

    On the other hand, I didn't have this problem with com.unity.platforms.windows which seems to have uninstalled itself (by itself?) when updating com.unity.platforms.
    I always have a bit of trouble with the package manager which, I find, is not the best UX when it comes to unexpected cascade package updates, wrong dependencies or incompatible Unity version.

    My source ECS being relatively simple, I didn't have as much trouble as I had anticipated.

    I used the "Add missing partial keyword to systems" tool, convenient and without hassle.

    I was expecting a performance gain or possibly, as I read in some places, a performance loss, but at first glance the result is strictly the same.

    Finally, being able to use the DOTS tool windows will certainly make the task of parallelizing what I have left on the main thread easier.

    Half a day and it build without mistakes.
    If you're not sure, it might be worth a shot, especially since the manual is a bit better.

    I started DOTS mainly for Havok without any notion of Burst, simply because, among other things, the manual doesn't mention it. It seems obvious, however, there is a world to know before daring to use DOTS and its performance by Default. I think now is a good time to learn it.