Skip to content

Commit a89eb6b

Browse files
authored
Merge pull request #23 from yellowisher/improve/name_as_tie_breaker
Use menu name or type name as tie breaker.
2 parents 367bf20 + 04920fa commit a89eb6b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Assets/MackySoft/MackySoft.SerializeReferenceExtensions/Editor/TypeMenuUtility.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public static IEnumerable<Type> OrderByType (this IEnumerable<Type> source) {
3232
return -999;
3333
}
3434
return GetAttribute(type)?.Order ?? 0;
35+
}).ThenBy(type => {
36+
if (type == null) {
37+
return null;
38+
}
39+
return GetAttribute(type)?.MenuName ?? type.Name;
3540
});
3641
}
3742

0 commit comments

Comments
 (0)