From 2746cf08d7a16f790012d64018ee40c716d506f6 Mon Sep 17 00:00:00 2001 From: Morgan Hoarau Date: Mon, 15 Dec 2025 15:39:41 +0000 Subject: [PATCH 1/2] Simplify assignment in InputActionReferencePropertyDrawer Replaces redundant creation of InputActionReference with direct assignment, setting the property to the candidate reference or null as appropriate. --- .../PropertyDrawers/InputActionReferencePropertyDrawer.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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(); From 39b8ff503ecb1ce68fd3352119f00acaf73c8bae Mon Sep 17 00:00:00 2001 From: Morgan Hoarau Date: Mon, 15 Dec 2025 15:39:44 +0000 Subject: [PATCH 2/2] Update CHANGELOG.md --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index fe83a9780c..7cad4bd730 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -14,6 +14,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