Skip to content

Commit 010f993

Browse files
Unregister before registering some of the EditorApplication in OnGlobalInitialize()
Co-authored-by: u-pr[bot] <205906871+u-pr[bot]@users.noreply.github.com>
1 parent d8a3405 commit 010f993

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Packages/com.unity.inputsystem/InputSystem/Editor/InputSystemEditorInitializer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ internal static void InitializeInEditor(bool calledFromCtor, IInputRuntime runti
187187
// Settings object should get set by an actual InputSettings asset.
188188
InputSystem.s_Manager = InputManager.CreateAndInitialize(runtime ?? NativeInputRuntime.instance, null);
189189
EditorApplication.playModeStateChanged += OnEditorPlayModeStateChanged;
190+
EditorApplication.playModeStateChanged -= OnEditorPlayModeStateChanged;
191+
EditorApplication.playModeStateChanged += OnEditorPlayModeStateChanged;
192+
EditorApplication.projectChanged -= OnEditorProjectChanged;
190193
EditorApplication.projectChanged += OnEditorProjectChanged;
191194

192195
InputSystem.s_Manager.runtime.onPlayModeChanged = InputSystem.OnPlayModeChange;

0 commit comments

Comments
 (0)