Search Unity

Resolved Bridging Mono/Managed and ECS code..

Discussion in 'DOTS Dev Blitz Day 2022 - Q&A' started by MidnightCow, Dec 7, 2022.

  1. MidnightCow

    MidnightCow

    Joined:
    Jun 2, 2017
    Posts:
    30
    Hi,

    Some core unity features have been updated to leverage the Jobs API for example but still require some form of bridging between mono/managed code and ECS code.. There's a lot of inconsistency floating around this and it feels quite clumsy to deal with...

    It would seem to make sense to refactor a lot of these Unity features leveraging DOTS/ECS underneath whilst still having a managed 'layer' that can be accessed from a mono/managed context - this would give the benefit of smooth and performant integration with users` ECS systems as well as maintaining compatibility with more traditional monobehaviour code..
    • Is this something that has been thought about?
    One off-the-cuff example would be VFX Graph.. An incredible toolset but requires 'stepping out' of pure ECS and creating clumsy interops between monobehaviour classes and ECS to communicate with it. Another example being UI stuff, and ( before it was removed ) animation requiring communication with the managed Animator etc etc.. More consistency across the board would make life easier ( and faster ) and also let new devs trying out DOTS hit the ground running more easily.

    Regards and thanks for all the hard work building and evolving DOTS!
     
  2. jivalenzuela

    jivalenzuela

    Unity Technologies

    Joined:
    Dec 4, 2019
    Posts:
    76
    We have plans to tackle the separate problems of supporting
    GameObject/MonoBehaviour
    APIs while using DOTS technology underneath, as well as enabling more consistent support of Entities by Unity projects. The former is further along than the latter.
     
  3. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    what are the plans? any suggestion for the current user of ECS to tackle them ?
     
    Neiist likes this.