Skip to content

Commit 3f541d7

Browse files
committed
Merge remote-tracking branch 'origin/develop' into fix/uum-144318-inputactionseditorwindow-restore
# Conflicts: # Packages/com.unity.inputsystem/CHANGELOG.md
2 parents b84a6c3 + 9481632 commit 3f541d7

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99

1010
### Fixed
1111

12+
- Fixed an `OverflowException` when creating a control scheme (or other named item) whose all-numeric name exceeds `Int32.MaxValue`, which previously discarded the entered name and fell back to the default [UUM-145766](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-145766)
1213
- Fixed the Input Actions editor window logging a "Failed to load asset" exception on editor startup when its saved window layout was restored in a project where the referenced asset GUID did not resolve; the window now closes quietly instead [UUM-144318](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144318)
1314
- Empty foldouts are no longer shown for processors and interactions that have no settings (e.g. "Invert") [UUM-144325](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-144325)
1415
- Fixed the Input Actions editor toolbar buttons being clipped when the Action Properties panel grew tall enough to show a scrollbar

Packages/com.unity.inputsystem/InputSystem/Runtime/Utilities/StringHelpers.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,17 +328,18 @@ public static string MakeUniqueName<TExisting>(string baseName, IEnumerable<TExi
328328

329329
var name = baseName;
330330
var nameIsUnique = false;
331-
var namesTried = 1;
331+
var namesTried = 1L;
332332

333333
// If the name ends in digits, start counting from the given number.
334334
if (baseName.Length > 0)
335335
{
336336
var lastDigit = baseName.Length;
337337
while (lastDigit > 0 && char.IsDigit(baseName[lastDigit - 1]))
338338
--lastDigit;
339-
if (lastDigit != baseName.Length)
339+
if (lastDigit != baseName.Length &&
340+
long.TryParse(baseName.Substring(lastDigit), out var trailingNumber))
340341
{
341-
namesTried = int.Parse(baseName.Substring(lastDigit)) + 1;
342+
namesTried = trailingNumber + 1;
342343
baseName = baseName.Substring(0, lastDigit);
343344
}
344345
}

0 commit comments

Comments
 (0)