diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 751d997e06..7570433300 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -18,6 +18,7 @@ however, it has to be formatted properly to pass verification tests. - Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395). - Fixed extra empty lines being displayed in the control binding list when mouse buttons are pressed [ISXB-1677](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1677) +- Fixed InputActionReference not being set when attempting to set it on a Prefab or ScriptableObject [ISXB-1787](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1787) ### Changed diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs index b660547db6..540422e27a 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs @@ -48,9 +48,7 @@ public void OnGUI(Rect position, SerializedProperty property, GUIContent label, // Only assign the value was actually changed by the user. if (EditorGUI.EndChangeCheck() && !Equals(candidate, current)) { - var reference = candidate as InputActionReference; - property.objectReferenceValue = reference ? - InputActionReference.Create(reference.action) : null; + property.objectReferenceValue = candidate as InputActionReference; // set to either the reference or null. } EditorGUI.EndProperty();