Merge pull request #22 from yellowisher/improve/force_nesting
Force nesting when there is any sub menu in AddTypeMenu attribute.
This commit is contained in:
commit
ac191b642d
@ -44,6 +44,11 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
|||||||
if (splittedTypePath.Length <= 1) {
|
if (splittedTypePath.Length <= 1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// If they explicitly want sub category, let them do.
|
||||||
|
if (TypeMenuUtility.GetAttribute(type) != null) {
|
||||||
|
isSingleNamespace = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
for (int k = 0;(splittedTypePath.Length - 1) > k;k++) {
|
for (int k = 0;(splittedTypePath.Length - 1) > k;k++) {
|
||||||
string ns = namespaces[k];
|
string ns = namespaces[k];
|
||||||
if (ns == null) {
|
if (ns == null) {
|
||||||
@ -54,6 +59,10 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isSingleNamespace) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add type items.
|
// Add type items.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user