@@ -161,9 +161,11 @@ public void OnGUI(Rect rect, GUIContent label = null, SerializedProperty propert
161
161
162
162
private void ShowDropdown ( Rect rect , SerializedProperty serializedProperty , Action modifiedCallback )
163
163
{
164
- #if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
164
+ #if UNITY_INPUT_SYSTEM_PROJECT_WIDE_ACTIONS
165
165
InputActionsEditorSettingsProvider . SetIMGUIDropdownVisible ( true , false ) ;
166
- #endif
166
+ #endif
167
+ IsShowingDropdown = true ;
168
+
167
169
if ( m_PickerDropdown == null )
168
170
{
169
171
m_PickerDropdown = new InputControlPickerDropdown (
@@ -187,6 +189,8 @@ private void ShowDropdown(Rect rect, SerializedProperty serializedProperty, Acti
187
189
m_PickerDropdown . SetExpectedControlLayout ( m_ExpectedControlLayout ) ;
188
190
189
191
m_PickerDropdown . Show ( rect ) ;
192
+
193
+ IsShowingDropdown = false ;
190
194
}
191
195
192
196
private void SetExpectedControlLayoutFromAttribute ( SerializedProperty property )
@@ -209,6 +213,13 @@ private void SetExpectedControlLayoutFromAttribute(SerializedProperty property)
209
213
210
214
private InputControlPickerDropdown m_PickerDropdown ;
211
215
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 ; }
212
223
}
213
224
}
214
225
#endif // UNITY_EDITOR
0 commit comments