Skip to content

Commit e0ade1c

Browse files
committed
Fixed distribution names not displaying in build configuration list
1 parent 3337967 commit e0ade1c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111

12+
- Fixed distribution names not displaying in build configuration list.
1213
- Check output folder is valid before trying to open it after a build.
1314

1415
## [5.0.2] - 2022-01-04

Editor/Build/UI/UnityBuildGUIUtility.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,18 @@ public static string ToLabel(string input, int maxLength = 60)
116116
string suffix = "...";
117117
char[] trimChars = new char[] { ' ', ',', '.', '/' };
118118

119-
Match match = Regex.Match(input, @"(?<primary>.*)\((?<secondary>.*)\)");
119+
Match match = Regex.Match(input, @"(?<primary>.*)\((?<secondary>.*)\)(?<tertiary>.*)");
120120

121121
if (match.Success)
122122
{
123123
string primary = match.Groups["primary"].Value;
124124
string secondary = match.Groups["secondary"].Value;
125+
string tertiary = match.Groups["tertiary"].Value;
125126

126-
if (!string.IsNullOrEmpty(match.Groups["secondary"].Value))
127+
if (!string.IsNullOrEmpty(secondary))
127128
{
128-
output = primary + "(" + secondary.Truncate(maxLength - primary.Length - 2, suffix, trimChars) + ")";
129+
int truncateLength = primary.Length + tertiary.Length;
130+
output = primary + "(" + secondary.Truncate(maxLength - truncateLength - 2, suffix, trimChars) + ")" + tertiary;
129131
}
130132
else
131133
{

0 commit comments

Comments
 (0)