Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Unity 2021.2.b12+13: Script domain reload does not work

Discussion in '2021.2 Beta' started by KnightPista, Sep 27, 2021.

  1. KnightPista

    KnightPista

    Joined:
    May 18, 2015
    Posts:
    40
    Hi,

    After update to 2021.2.b12 and b13 I've found that no matter what setting is checked inside Editor Player Mode Settings, script domain is not reloaded.
    For example all static instances in the script are not reset, even if Reload Domain is checked.

    In Beta 11 it works.

    Repro:
    1. create new empty project with 2021.2.b13
    2. create a new script, put a static variable inside it, assign for example value of 0, inside Awake() do a check if value is 1, if it is you know it failed, otherwise assign 1
    3. run, stop, run
    4. after second run notice that check failed, static variable is not reset even if Domain Reload is checked inside Editor settings

    Best,
    Stefan
     
  2. TheRobWatling

    TheRobWatling

    Joined:
    Feb 18, 2013
    Posts:
    49