Search Unity

Question resources and tutorials for learning dots and ecs in 2022?

Discussion in 'Entity Component System' started by Nubnubbud, Jul 29, 2022.

  1. Nubnubbud

    Nubnubbud

    Joined:
    Nov 19, 2014
    Posts:
    49
    I'm sorry if this has been asked, but the availability of dots and ecs in the current (or at least recent) versions of unity has prompted my return, only to see that the version number is... three times higher than it was before! you guys have been busy!

    Because of this, I'm not sure exactly how to find help learning it. I've attempted to search youtube, the forums, and looked on the documentation (super dense on specifics, super sparse in beginner info and common use case, and what appear to be... pictures of busses and tangential theory explanations for new user introduction.) but there's not much to go on. There's a lot of stuff made 2 and 3 years ago- but half of it warns of changes, that "hybrid ecs" doesn't exist, whatever that is, and all kinds of information that is no longer relevant to a modern new user of DOTS, or building on information from before "huge changes were just made" a year ago.

    After several days of searching, my eyes are drifting apart trying to make sense of all the docs, so I'm gonna ask here;
    Being more experienced with dots, how would you learn it/ where would you go for a tutorial if it was your first time learning right now, and you needed a source of info that didn't assume you were already familiar?
     
  2. RJ_R

    RJ_R

    Joined:
    Aug 7, 2017
    Posts:
    4
    Last edited: Jul 29, 2022
    Haxel0rd and bb8_1 like this.
  3. Nubnubbud

    Nubnubbud

    Joined:
    Nov 19, 2014
    Posts:
    49
    I see... that's what I feared. This is concerning to say the least- I could imagine the first month or so after a large update that people would be scrambling to update things, but it's been several, and all I've seen is even more complex or in depth guides and discussion, while everyone is distracted by other tangentially related news.

    I totally get the concepts- I'm a "learn from the bottom" kinda guy so I learned how transistors worked before I could manage to write any proper code- that said, a tutorial where you get a basic script spawning entities like trees on the ground, then building it out to add things like species, biomes, collisions, and swaying in the wind would be ideal, yet probably basic for the more advanced dots users.
     
    Haxel0rd likes this.
  4. Kmsxkuse

    Kmsxkuse

    Joined:
    Feb 15, 2019
    Posts:
    306
    If you know your way around Unity and C#, I recommend starting with the Hello Cube samples:

    https://github.com/Unity-Technologi...mples/tree/master/ECSSamples/Assets/HelloCube

    Create a rotate a cube in increasingly more complex ways. You'll be using the more complex examples for regular game logic but rotating a cube is simple enough to understand and figure out what went wrong if it doesn't work.

    There are also URP and HDRP samples in the root of that repo for rendering using Hybrid Renderer.

    If you want to jump into the deep end, there's also the full project tutorial using DOTS + DOTS Physics + DOTS Netcode + UI Toolkit and even a touch of AR. Possibly the most complete and complex tutorial I have ever seen on DOTS and it's even up to date for 0.51.

    This is the very deep end of Unity ECS so I recommend first starting out with the ECS samples before trying your hand at the following.

    https://dots-tutorial.moetsi.com/

    Still, I even go back occasionally to refresh on some concepts using that tutorial and I've been mucking around DOTS for nearly 4 years now.
     
    Haxel0rd and bb8_1 like this.
  5. bb8_1

    bb8_1

    Joined:
    Jan 20, 2019
    Posts:
    100
    Last edited: Jul 31, 2022
    Haxel0rd likes this.
  6. Nubnubbud

    Nubnubbud

    Joined:
    Nov 19, 2014
    Posts:
    49
    yeah, this is exactly what I wanted to avoid, though. I'm learning ECS for the first time, essentially, and it's a massive paradigm shift in how things are designed.

    At the same time, it's in a constant state of flux at the moment, and I can't be sure old tutorials are still any good, because they all cover things and workflows that often don't exist any more. I right click in my scripts folder and make something called a "Runtime Authoring Script" but the only tutorials that use it just ignore that, and do something like talk about some strange quirk of buffers or prefabs or archetypes that you sometimes encounter when already fluent in DOTS.

    for example, the code monkey video you posted begins by opening the entity debugger, then promptly begins working on a monobehaviour script! Would those things still work? is that a suggested workflow? I just don't know! I could look in the documentation, but it's terribly dense, and I might end up exposing myself to enough conflicting information that I end up unsure of a lot of my knowledge base.
     
  7. bb8_1

    bb8_1

    Joined:
    Jan 20, 2019
    Posts:
    100
    Well if u want more gentle introduction to newest version of dots(0.50, 0.51) u have Turbos tutorial and Moetsi also did an excellent job : https://dots-tutorial.moetsi.com/ , i must admit i did not make it clear enough that last two on my list cover more 0.17 version or previous ones(which have support for animations for example), DevViktoria on the other hand has more advanced dots tutorial - she also has 0.50 related videos. Also dots is constantly evolving tech so u can expect breaking changes when for example 1.0 is released...

    Spawning entities, using prefabs(prefabs are GameObjects turned to assets u can instantiate at the runtime very cool classic Unity feature - spawning prefabs is absolutely basic thing u should learn first in dots) etc is explained here :
    https://docs.unity3d.com/Packages/com.unity.entities@0.51/manual/conversion.html#prefabs
    https://dots-tutorial.moetsi.com/unity-ecs/spawn-and-move-prefabs-in-unity-ecs
    a bit more advanced tutorial(or list of all options u have in dots) on spawning prefabs is here :
    https://forum.unity.com/threads/spawning-prefabs-in-dots-subscenes-vs-addressables.1313964/

    I really recommend u Moetsi tutorial if u want to learn dots gradually from the basic things also u have link on his site to his discord server where u can ask for explanations - there is friendly community which will help also u have Unity discord server with dots related channel and also here on this forum u have plenty of threads with explanations of basic things u are searching for(there is Turbo's discord server too) ...
     
    Last edited: Jul 31, 2022