Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions Packages/com.unity.inputsystem/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

- 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)
- Fixed the Input Debugger window (Window > Analysis > Input Debugger) being resizable arbitrarily small until its toolbar and device/action/layout tree view were no longer usably visible; it now enforces a minimum window size [UUM-137119](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-137119)
- Fixed the Action Maps list in the Input Actions editor losing keyboard focus after deleting a map, so that Delete, Duplicate, and arrow-key navigation kept working on the auto-selected replacement map without requiring an extra click [UUM-147152](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-147152)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,17 +328,18 @@ public static string MakeUniqueName<TExisting>(string baseName, IEnumerable<TExi

var name = baseName;
var nameIsUnique = false;
var namesTried = 1;
var namesTried = 1L;

// If the name ends in digits, start counting from the given number.
if (baseName.Length > 0)
{
var lastDigit = baseName.Length;
while (lastDigit > 0 && char.IsDigit(baseName[lastDigit - 1]))
--lastDigit;
if (lastDigit != baseName.Length)
if (lastDigit != baseName.Length &&
int.TryParse(baseName.Substring(lastDigit), out var trailingNumber))
Comment thread
Pauliusd01 marked this conversation as resolved.
Outdated
{
namesTried = int.Parse(baseName.Substring(lastDigit)) + 1;
namesTried = (long)trailingNumber + 1;
baseName = baseName.Substring(0, lastDigit);
}
}
Expand Down
Loading