Skip to content

Commit 0c39606

Browse files
authored
FIX: InputActionReference not set on Prefab and ScriptableObject (ISBX-1787) (#2303)
1 parent e8095ae commit 0c39606

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ however, it has to be formatted properly to pass verification tests.
1818

1919
- Fixed warnings being generated on Unity 6.4 and 6.5. (ISX-2395).
2020
- 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)
21+
- 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)
2122

2223
### Changed
2324

Packages/com.unity.inputsystem/InputSystem/Editor/PropertyDrawers/InputActionReferencePropertyDrawer.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ public void OnGUI(Rect position, SerializedProperty property, GUIContent label,
4848
// Only assign the value was actually changed by the user.
4949
if (EditorGUI.EndChangeCheck() && !Equals(candidate, current))
5050
{
51-
var reference = candidate as InputActionReference;
52-
property.objectReferenceValue = reference ?
53-
InputActionReference.Create(reference.action) : null;
51+
property.objectReferenceValue = candidate as InputActionReference; // set to either the reference or null.
5452
}
5553

5654
EditorGUI.EndProperty();

0 commit comments

Comments
 (0)