@@ -161,9 +161,11 @@ public void OnGUI(Rect rect, GUIContent label = null, SerializedProperty propert
161161
162162 private void ShowDropdown ( Rect rect , SerializedProperty serializedProperty , Action modifiedCallback )
163163 {
164- #if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
164+ #if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
165165 InputActionsEditorSettingsProvider . SetIMGUIDropdownVisible ( true , false ) ;
166- #endif
166+ #endif
167+ IsShowingDropdown = true ;
168+
167169 if ( m_PickerDropdown == null )
168170 {
169171 m_PickerDropdown = new InputControlPickerDropdown (
@@ -187,6 +189,8 @@ private void ShowDropdown(Rect rect, SerializedProperty serializedProperty, Acti
187189 m_PickerDropdown . SetExpectedControlLayout ( m_ExpectedControlLayout ) ;
188190
189191 m_PickerDropdown . Show ( rect ) ;
192+
193+ IsShowingDropdown = false ;
190194 }
191195
192196 private void SetExpectedControlLayoutFromAttribute ( SerializedProperty property )
@@ -209,6 +213,13 @@ private void SetExpectedControlLayoutFromAttribute(SerializedProperty property)
209213
210214 private InputControlPickerDropdown m_PickerDropdown ;
211215 private readonly InputControlPickerState m_PickerState ;
216+
217+ /// <summary>
218+ /// This property is only set from this class in order to communicate that we're showing the dropdown at the moment
219+ /// It's employed to skip auto-saving, because that complicates updating the internal SerializedProperties.
220+ /// Unfortunately, we can't use IMGUIDropdownVisible from the setings provider because of the early-out logic in there.
221+ /// </summary>
222+ public static bool IsShowingDropdown { get ; private set ; }
212223 }
213224}
214225 #endif // UNITY_EDITOR
0 commit comments