Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

Is the eventual goal of PureECS to eliminate the Monobehavior?

Discussion in 'Data Oriented Technology Stack' started by alexchesser, Sep 6, 2019.

  1. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    35
    I am trying to understand the architecture of DOTS and at least at the moment, there are a few places where it seems that it is challenging to build without using a monobehavior.

    Some examples:
    • On a button UI element for example, the current method of handling the onclick event in a button script looks for a Monobahavior.
    • The LoadSceneAsync method in SceneManager requires a Coroutine because it is a Unity AsyncOperation (as opposed to an awaitable Task you might find in C#)
    • The samples provided with the NEW INPUT SYSTEM appear to use monobehaviors as well. (edit: actually this doesn't seem to need a monobehavior)
    In my current project, I'd ideally like to learn to build in a way that doesn't rely on "old" methods, but since I keep running up against the "crutch" of just doing everything the monobehavior way I find myself wondering if I've just got a broken perception of the right way to do things.

    Is the goal of DOTS to work without Monobehaviors entirely or to just eliminate them from the primary game loop?
     
    Last edited: Sep 6, 2019
    JoNax97 likes this.
  2. ndesy

    ndesy

    Joined:
    Jul 22, 2019
    Posts:
    19
    I think the goal is to use game objects for authoring and ECS for runtime.
     
    Tony_Max and alexchesser like this.
  3. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,623
  4. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    736
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,411
    While Unity is in slow transition of their features toward ECS/DOTS, more and more features will be available via pure ECS. Until then, (for years to come), these features which are not available via DOTS, will be accessible via MonoBehaviour, or Classical GameObjects.
     
  6. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,623
    Read again. It’s link to answer from Joachim
     
  7. francois85

    francois85

    Joined:
    Aug 11, 2015
    Posts:
    736
    A
    ahh Got it , for some reason on my phone it jumped to the top of the thread. Ty
     
  8. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    322
    The goal of DOTS is the highest possible performance, with an ease of use that has not been attempted before. You can read between the lines that any situation requiring the performance of pure ECS will not need or want any usage of monobehaviours, though they are used for describing(authoring) how the parts of your game will then be converted to pure ECS.
    The vast majority of Unity's current features still lag behind having ECS native parts(such as any and all of the current UI as you found out), hopefully we will get more preview packages that broaden the scope of dots soon.
     
    alexchesser likes this.