You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Unity (and maybe other environments) it is possible to restart the game in the editor without reloading .NET domain. This speeds up the iteration process by saving the time spent on reloading, but comes with the potential issues due to static fields not being reset properly.
So we should provide a method to reset our statics and use it in Unity whenever the domain is reused:
revision counter
auto-observable current
scheduler state
This is not the most important issue, because these static values are very short-lived, except for revision. Resetting revision, while is a logical thing to do, can cause clashes with user's own observables that persist statically through restarts without domain reloading, so this should be well-documented and maybe even toggleable through a compiler define.
The text was updated successfully, but these errors were encountered:
nadako
changed the title
Provide a way to reset internal static fields and use it in Unity
Provide a way to reset internal static fields (and use it in Unity)
Jul 26, 2024
In Unity (and maybe other environments) it is possible to restart the game in the editor without reloading .NET domain. This speeds up the iteration process by saving the time spent on reloading, but comes with the potential issues due to static fields not being reset properly.
So we should provide a method to reset our statics and use it in Unity whenever the domain is reused:
This is not the most important issue, because these static values are very short-lived, except for revision. Resetting revision, while is a logical thing to do, can cause clashes with user's own observables that persist statically through restarts without domain reloading, so this should be well-documented and maybe even toggleable through a compiler define.
The text was updated successfully, but these errors were encountered: