Zenject
Zenject copied to clipboard
Add support for fast Play Mode entering (Unity 2019.3 feature)
Is your feature request related to a problem? Please describe. According to the Google Groups message "Fast Play Mode" Extenject doesn't support the Unity feature of entering the playmode faster within the Unity Editor. This is achieved by not reloading the domain (doesn't reset static variables, doesn't execute static constructors etc.) and/or not reloading the scene. (I didn't test this behavior myself so far, but this feature is very useful during the development of a game.) Before this is implemented, it should be verified first that there actually are issues regarding this Unity feature - the post in the Google group didn't describe a scenario that fails.
Describe the solution you'd like Changes required are detailed in Unitys blog post about the "Enter Play Mode faster" feature in the "How to modify your scripts correctly when you’ve disabled Domain Reload" section
- Domain Reload: reset all static variables, and make sure that the initialization code reinitializes them
- improvement: identify static variables that don't need to be reset, and don't adjust them
- Scene reload: make sure Extenject doesn't alter scenes in a non-persistent manner
Describe alternatives you've considered Documenting the lack of support for this feature. (This isn't a feature that can easily be implemented by the user of Extenject, and it shouldn't be expected to be implemented by the user.)
Additional context The "Enter Play Mode faster" feature introduced in Unity 2019.3 enables the developer to have faster development cycles, since starting the gameplay in editor within the currently opened scene is much faster with an improvement of 3x to 10x according to Unitys benchmarks. Enabling this option doesn't reload the domain i. e. doesn't discard the static data within the managed code (if not deselected), and doesn't reload the scene. In order for custom code (Extenject) to support this feature, the global state (static variables) might need to be reset, and "temporary" changes to the scene that usually are reverted by other means before saving need to be reverted manually.