Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. 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:
    40