Search Unity

Will ECS/Jobs work with WebGL?

Discussion in 'Entity Component System' started by Arowx, Jun 30, 2018.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Just tried building to WebGL and the game built without error but did not run correctly.

    I think that WebGL/WASM does not have a working native threading system yet, however the potential throughput of ECS even on a single thread could still make it useful for WebGL development.

    Also wasn't there a demo of a micro version of Unity built on ECS that built to Web?
     
    deus0 likes this.
  2. zulfajuniadi

    zulfajuniadi

    Joined:
    Nov 18, 2017
    Posts:
    117
    Threading in the browser is done via [webworkers] which is a part of the HTML5 specification which can run side by side with WebGL. It is supported on [most] browsers today. I'm sure Unity is working on getting that implemented.

    There is a micro version of Unity aptly named Utiny in the works which does feature ECS to be the core part of it. It's targeted for games delivered through messaging apps. Theres more about that in [this] video.
     
    Last edited: Jun 30, 2018
    deus0 likes this.
  3. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
  4. zulfajuniadi

    zulfajuniadi

    Joined:
    Nov 18, 2017
    Posts:
    117
    "Shared memory can be created and updated simultaneously in workers or the main thread" yeah sounds like NativeArray alright :). Thanks for that
     
    deus0 and 5argon like this.
  5. deus0

    deus0

    Joined:
    May 12, 2015
    Posts:
    256
    Any progress here? Daym webgl is dead rip~
     
  6. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Old thread from 2018 -> 2019.1 - Unity Forum

     
  7. starikcetin

    starikcetin

    Joined:
    Dec 7, 2017
    Posts:
    340
    @deus0
    WebGL is not going anywhere anytime soon, but I expect WebGPU to eventually replace it some unknown time in the future.
     
    deus0 likes this.
  8. deus0

    deus0

    Joined:
    May 12, 2015
    Posts:
    256
    It's been dead since I adopted a multi core cpu lol. I am needing that multithread support for it to work with ECS!