
When Domain Reloading is enabled, the counter automatically resets to zero when entering Play Mode. The following code example has a static counter field which increments when the user presses the Jump button. You need to add code that explicitly does this. When Domain Reloading is disabled, the values of static fields in your code do not automatically reset to their original values. To ensure your scripting states correctly reset at Play Mode, you need to make adjustments to static fields and static event handlers in your scripts.

Modifying your scripts to perform correctly when Domain Reload is disabled: When Domain Reloading is disabled, Unity still refreshes the scripting state when you update or re-import a script, based on your auto-refresh settings. To do this, you need to add code that resets your scripting state when Play Mode starts. However, it is then up to you to ensure your scripting state resets when you enter Play Mode. When Domain Reloading is disabled, entering Play Mode is faster, because Unity does not reset the scripting state each time.

#Advanced wheel settings grid 2 reloaded edition how to
Make sure Enter Play Mode Options is enabled.įor more information, see How to configure Play Mode.This is the reason Unity provides the option to turn off Domain Reloading. When it takes a long time to enter Play Mode, it becomes harder to rapidly iterate on your Project. More info See in Glossary in your Project.

This means each time you enter Play Mode in the Unity Editor, your Project begins playing in a very similar way to when it first starts up in a build.ĭomain Reloading takes time, and this time increases with the number and complexity of the scripts A piece of code that allows you to create your own Components, trigger game events, modify Component properties over time and respond to user input in any way you like. It provides you with a completely fresh scripting state, and resets all static fields and registered handlers each time you enter Play Mode. Domain Reloading resets your scripting state, and is enabled by default.
