Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Assets/Editor/DumpInputActionReferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ private static void DumpReferences(StringBuilder sb, string prefix, InputActionR
private static void DumpReferences()
{
var sb = new StringBuilder();
#pragma warning disable CS0618 // Type or member is obsolete
DumpReferences(sb, "Loaded objects", Object.FindObjectsByType<InputActionReference>(
FindObjectsInactive.Include, FindObjectsSortMode.InstanceID));
#pragma warning restore CS0618 // Type or member is obsolete
DumpReferences(sb, "All objects:", Resources.FindObjectsOfTypeAll<InputActionReference>());
Debug.Log(sb.ToString());
}
Expand Down
6 changes: 6 additions & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ however, it has to be formatted properly to pass verification tests.

## [Unreleased] - yyyy-mm-dd

### Changed

- Updated `m_ActionAssetInstanceID` in PlayerInputEditor.cs to use `EntityId` instead of `InstanceID`.

### Fixed

### Added

## [1.18.0] - 2026-01-14

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@

var assetChanged = CheckIfActionAssetChanged();
// initialize the editor component if the asset has changed or if it has not been initialized yet
#if UNITY_6000_5_OR_NEWER
if (EditorGUI.EndChangeCheck() || !m_ActionAssetInitialized || assetChanged || m_ActionAssetEntityId == EntityId.None)

Check warning on line 101 in Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs#L101

Added line #L101 was not covered by tests
#else
if (EditorGUI.EndChangeCheck() || !m_ActionAssetInitialized || assetChanged || m_ActionAssetInstanceID == 0)
#endif
{
InitializeEditorComponent(assetChanged);
actionsWereChanged = true;
Expand Down Expand Up @@ -278,6 +282,14 @@
{
if (m_ActionsProperty.objectReferenceValue != null)
{
#if UNITY_6000_5_OR_NEWER
EntityId assetEntityId = m_ActionsProperty.objectReferenceValue.GetEntityId();
bool result = assetEntityId != m_ActionAssetEntityId && m_ActionAssetEntityId != EntityId.None;
m_ActionAssetEntityId = assetEntityId;
return result;

Check warning on line 289 in Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs

View check run for this annotation

Codecov GitHub.com / codecov/patch

Packages/com.unity.inputsystem/InputSystem/Plugins/PlayerInput/PlayerInputEditor.cs#L286-L289

Added lines #L286 - L289 were not covered by tests
}

#else
// 6.4 deprecates instance id in favour of entity ids (a class)
// Fortunately, there is an implicit cast from entity id to an integer so we can have minimum footprint for now.
int assetInstanceID;
Expand All @@ -295,6 +307,7 @@
}

m_ActionAssetInstanceID = -1;
#endif
return false;
}

Expand Down Expand Up @@ -656,7 +669,11 @@

[NonSerialized] private bool m_NotificationBehaviorInitialized;
[NonSerialized] private bool m_ActionAssetInitialized;
#if UNITY_6000_5_OR_NEWER
[NonSerialized] private EntityId m_ActionAssetEntityId;
#else
[NonSerialized] private int m_ActionAssetInstanceID;
#endif
}
}
#endif // UNITY_EDITOR