Skip to content

Commit bab2f61

Browse files
FIX: uum 134737 corrupt input action asset editor window on restart (#2371)
Co-authored-by: Morgan Hoarau <122548697+MorganHoarau@users.noreply.github.com>
1 parent 507cd76 commit bab2f61

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1515
- Improved New Input System warning dialog, Native Device Inputs Not Enabled [UUM-132151].
1616
- Fixed caching for InputControlPath display name [ISX-2501](https://jira.unity3d.com/browse/ISX-2501)
1717
- Fixed editor closing and not saving the input asset when clicking cancel in the dialog prompt [UUM-134748](https://jira.unity3d.com/browse/UUM-134748)
18+
- Fixed the input actions editor window entering a corrupt state when restarting Unity after the asset was edited. [UUM-134737](https://jira.unity3d.com/browse/UUM-134737)
1819

1920
### Changed
2021

Packages/com.unity.inputsystem/InputSystem/Editor/UITKAssetEditor/InputActionsEditorWindow.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,9 @@ private void CreateGUI() // Only domain reload
215215
if (m_AssetObjectForEditing == null)
216216
{
217217
workingCopy = InputActionAssetManager.CreateWorkingCopy(asset);
218+
m_State = new InputActionsEditorState(m_State, new SerializedObject(workingCopy));
218219
if (m_State.m_Analytics == null)
219220
m_State.m_Analytics = analytics;
220-
m_State = new InputActionsEditorState(m_State, new SerializedObject(workingCopy));
221221
m_AssetObjectForEditing = workingCopy;
222222
}
223223
else
@@ -348,6 +348,13 @@ private bool OnWantsToQuit()
348348
// Here the user will be prompted
349349
bool isAllowedToQuit = CheckCanCloseAndPromptIfDirty(false);
350350
m_IsEditorQuitting = isAllowedToQuit;
351+
352+
if (m_IsEditorQuitting)
353+
{
354+
// Reset flag in case another wantsToQuit listener aborts the quit.
355+
EditorApplication.delayCall += () => m_IsEditorQuitting = false;
356+
}
357+
351358
return m_IsEditorQuitting;
352359
}
353360

0 commit comments

Comments
 (0)