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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

How do I get started with ECS? (in 2020)

Discussion in 'Entity Component System' started by AVAVT, Dec 15, 2019.

  1. AVAVT

    AVAVT

    Joined:
    Jul 28, 2015
    Posts:
    8
    Hello, I finally have enough time to study Unity ECS, but I don't know how to, like, get started?

    I don't mean the "What is ECS?" - it's all over the place already.

    I'm looking for guide (preferably in text format) for setting up the Unity project, adding code, and linking the Es and Cs and Ses together into a MVP "Hello World!" project.

    I got the sample repo, I clicked run and it ran, great!

    But I have absolutely no idea *why* it's running. There's just 1 or 2 code files in a folder and magically they... works... no idea why.

    There are some get started video series out there, I've been checking out some, but they are all greatly outdated. After skipping the first 30 minutes of explaining again what ECS is, when they reach actual code it just fail in various places and I can't proceed.

    Wasting so much time already, could some one guide me to a reliable source? I just need to know where the door is. I can walk the rest of the way myself :(
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,653
  3. AVAVT

    AVAVT

    Joined:
    Jul 28, 2015
    Posts:
    8
    Thanks for your reply eizenhorn. Could you elaborate which part of those documents relate to building a Hello World project?

    As I mentioned, the sample runs but I don't understand why it run or how the parts come together - there's no explanation.

    The package doc have great concept but after reading for a while I still don't see any place that answer the question "How do make a cube move from A to B?"
     
  4. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    This video might help with the base understanding. What's an Entity, what's a Component, and what's a System. The API for the more advanced part of the code is slightly different now and most likely will change even more in the future, but you still get an understanding of the base knowledge/structure of things.
     
    YosemiteMark and AVAVT like this.
  5. AVAVT

    AVAVT

    Joined:
    Jul 28, 2015
    Posts:
    8
    Thank you very much Grimreaper358, the video is greatly helpful!

    I still have one problem though, there are no place where System are "added" to the World. So
    - How do I know which order the systems are executed in, and
    - How did the sample repository split systems into different scenes?
     
  6. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    I can't say for sure since I'm not a programmer or know much about ECS. This is what I found in the docs

    Systems Docs Page - 4th Paragraph down
    upload_2019-12-15_13-15-12.png
     
    AVAVT likes this.
  7. AVAVT

    AVAVT

    Joined:
    Jul 28, 2015
    Posts:
    8
    Thanks, I just read that as well. The sample repo have all systems running in all scenes and that's why I didn't see part that relate to system control.

    I think I have enough to get going now, thank you very much again! :)