Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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)
- 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)
- Fixed the Input Actions editor toolbar buttons being clipped when the Action Properties panel grew tall enough to show a scrollbar
- Fixed the Control Schemes dropdown in the Input Actions editor continuing to display a deleted scheme's name after the last control scheme was removed, instead of resetting to "No Control Schemes" until the asset was saved or the editor reopened. [UUM-141563](https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-141563)
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 &&
long.TryParse(baseName.Substring(lastDigit), out var trailingNumber))
{
namesTried = int.Parse(baseName.Substring(lastDigit)) + 1;
namesTried = trailingNumber + 1;
baseName = baseName.Substring(0, lastDigit);
}
}
Expand Down
Loading