Search Unity

Hotswapping in ECS

Discussion in 'Entity Component System' started by Guedez, May 8, 2019.

  1. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    When I first started working with ECS I was super sad to discover that there was no support for hotswapping at the time.
    Right now I am undergoing a huge refactoring of my code and updating to 2019.1, so I can't really check for maybe a week, so I will ask it here

    Is ECS currently supporting hotswapping, and if not, any prediction of when it will be available?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Define hotswapping
     
    Opeth001 likes this.
  3. SamOld

    SamOld

    Joined:
    Aug 17, 2018
    Posts:
    333
    Hot reloading after code changes?
     
  4. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    when you start play mode, alt tab to visual studio, change the code, save, alt tab back to the editor and the code recompiles and now you are on the new code

    Edit: This thing
    upload_2019-5-8_20-3-54.png
     
    Last edited: May 9, 2019
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    I don't think it can in a sense, you can do with separate Monobehaviour scripts in certain cases.
    Here all is linked and often tied after compilation to threads, and whatever else is going under the hood.
    Not sure, if that would work in same way, if you got modding feature, with separate dlls files, to upload code at runtime. But most likely, is not what you ask for.

    May I ask, why do you require update script at runtime, if is that what you ask for?
     
  6. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    Because it's way faster to develop when you don't have to start a test from scratch to change a small coding error
     
    Antypodish likes this.
  7. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Supporting hotreload of script code that does not involve domain reload is something we are planning to do. It is not currently being worked on. Focus right now is on building the different core systems.
     
    optimise, FROS7, eizenhorn and 3 others like this.
  8. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    So Recompile And Continue PLaying is still not supported while using ECS?
     
  9. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
    At the moment is not.
     
    Guedez likes this.