Skip to content

Commit

Permalink
Merge pull request #140 from Mathijs-Bakker/fix-133-RemapKeyBindings
Browse files Browse the repository at this point in the history
Remap key bindings - Closes #133
  • Loading branch information
Mathijs-Bakker committed May 24, 2020
2 parents 9cd3075 + a90809d commit 5bf0343
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ This works ok for small projects, but as the complexity of your project grows it

You can do this in Zenject out-of-the-box by executing the menu item `Edit -> Zenject -> Validate Current Scene` or simply hitting `SHIFT+ALT+V` with the scenes open that you want to validate. This will execute all installers for the current scene, with the result being a fully bound container. It will then iterate through the object graphs and verify that all bindings can be found (without actually instantiating any of them). In other words, it executes a 'dry run' of the normal startup procedure. Under the hood, this works by storing dummy objects in the container in place of actually instantiating your classes.

Alternatively, you can execute the menu item `Edit -> Zenject -> Validate Then Run` or simply hitting `CTRL+SHIFT+R`. This will validate the scenes you have open and then if validation succeeds, it will start play mode. Validation is usually pretty fast so this can be a good alternative to always just hitting play, especially if your game has a costly startup time.
Alternatively, you can execute the menu item `Edit -> Zenject -> Validate Then Run` or simply hitting `CTRL+ALT+R`. This will validate the scenes you have open and then if validation succeeds, it will start play mode. Validation is usually pretty fast so this can be a good alternative to always just hitting play, especially if your game has a costly startup time.

Note that this will also include factories and memory pools, which is especially helpful because those errors might not be caught until sometime after startup.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ namespace Zenject.Internal
{
public static class ZenMenuItems
{
// NOTE: We use shift+alt+v instead of control+shift+v because control+shift+v conflicts
// with a vuforia shortcut
[MenuItem("Edit/Zenject/Validate Current Scenes #&v")]
public static void ValidateCurrentScene()
{
ValidateCurrentSceneInternal();
}

[MenuItem("Edit/Zenject/Validate Then Run #%r")]
[MenuItem("Edit/Zenject/Validate Then Run #&r")]
public static void ValidateCurrentSceneThenRun()
{
if (ValidateCurrentSceneInternal())
Expand Down

0 comments on commit 5bf0343

Please sign in to comment.