From 00249568fe7f458b4d8ac1ece9caa5b6019643c3 Mon Sep 17 00:00:00 2001 From: Trudy Spiller Date: Wed, 20 Nov 2024 12:14:12 +0000 Subject: [PATCH 1/2] Round pixelsPerPoint up rather than down when calculating icon scale --- .../InputSystem/Editor/Internal/GUIHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/GUIHelpers.cs b/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/GUIHelpers.cs index 18bd7a5055..a2d374ad0c 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/GUIHelpers.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Editor/Internal/GUIHelpers.cs @@ -43,7 +43,7 @@ public static void DrawLineSeparator(string label = null) public static Texture2D LoadIcon(string name) { var skinPrefix = EditorGUIUtility.isProSkin ? "d_" : ""; - var scale = Mathf.Clamp((int)EditorGUIUtility.pixelsPerPoint, 0, 4); + var scale = Mathf.Clamp(Mathf.CeilToInt(EditorGUIUtility.pixelsPerPoint), 0, 4); var scalePostFix = scale > 1 ? $"@{scale}x" : ""; if (name.IndexOfAny(Path.GetInvalidFileNameChars()) > -1) name = string.Join("_", name.Split(Path.GetInvalidFileNameChars())); From 72fe96fbe770e1a4692163c5bc7ebde3a7e8d1d7 Mon Sep 17 00:00:00 2001 From: Trudy Spiller Date: Wed, 20 Nov 2024 13:42:43 +0000 Subject: [PATCH 2/2] Update CHANGELOG.md --- Packages/com.unity.inputsystem/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index a1969a7bd0..4a60b17876 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -22,6 +22,7 @@ however, it has to be formatted properly to pass verification tests. - Fixed missing documentation for source generated Input Action Assets. This is now generated as part of the source code generation step when "Generate C# Class" is checked in the importer inspector settings. - Fixed pasting into an empty map list raising an exception. [ISXB-1150](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1150) - Fixed pasting bindings into empty Input Action asset. [ISXB-1180](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1180) +- Fixed icon scaling in Input Actions window. ### Changed - Added back the InputManager to InputSystem project-wide asset migration code with performance improvement (ISX-2086).