Skip to content

Commit 02ebaf5

Browse files
authored
[Input] AssetPostprocessor - check file exists before attempting to read it (InputActionImporter) (#1919)
FIX: Fixed a minor issue when importing InputAction assets that could result in unexpected logging during internal package validation checks. * [Input] AssetPostprocessor - check file exists before attempting to read it (InputActionImporter) o Added asset file check / early-out to CheckAndRenameJsonNameIfDifferent o Was causing failures in release QV Editor / package verification checks * [Input System] Added CHANGELOG.md entry: Fixed a minor issue when importing InputAction assets that could result in unexpected logging during internal package validation checks.
1 parent 1c84f1a commit 02ebaf5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ however, it has to be formatted properly to pass verification tests.
2727
- Fixed OnPointerClick events not propagating to child objects unless the child also handled OnPointerDown events [ISXB-857](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-857).
2828
- Fixed Input Actions Editor window resource leak that could result in unexpected exceptions [ISXB-865](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-865).
2929
- Fixed an issue where UI integration would throw exceptions when Project-wide Input Actions asset did not contain the implicitly required `UI` action map or was missing any of the required actions. Additionally this fix now also generates warnings in the console for any divergence from expected action configuration or lack of bindings in edit-mode.
30+
- Fixed a minor issue when importing InputAction assets that could result in unexpected logging during internal package validation checks.
3031

3132
### Changed
3233
- For Unity 6.0 and above, when an `EventSystem` GameObject is created in the Editor it will have the

Packages/com.unity.inputsystem/InputSystem/Editor/AssetImporter/InputActionImporter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,9 @@ private static void CheckAndRenameJsonNameIfDifferent(string assetPath)
374374
InputActionAsset asset = null;
375375
try
376376
{
377+
if (!File.Exists(assetPath))
378+
return;
379+
377380
// Evaluate whether JSON name corresponds to desired name
378381
asset = InputActionAsset.FromJson(File.ReadAllText(assetPath));
379382
var desiredName = Path.GetFileNameWithoutExtension(assetPath);

0 commit comments

Comments
 (0)