Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aedc9ba824 | |||
| ac191b642d | |||
| a89eb6bb87 | |||
| 04920fadb7 | |||
| 1f76157be0 | |||
| 367bf2065c | |||
| d221744fff |
@@ -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.
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
|||||||
return -999;
|
return -999;
|
||||||
}
|
}
|
||||||
return GetAttribute(type)?.Order ?? 0;
|
return GetAttribute(type)?.Order ?? 0;
|
||||||
|
}).ThenBy(type => {
|
||||||
|
if (type == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return GetAttribute(type)?.MenuName ?? type.Name;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "com.mackysoft.serializereference-extensions",
|
"name": "com.mackysoft.serializereference-extensions",
|
||||||
"displayName": "SerializeReference Extensions",
|
"displayName": "SerializeReference Extensions",
|
||||||
"version": "1.1.6",
|
"version": "1.1.7",
|
||||||
"unity": "2019.4",
|
"unity": "2019.4",
|
||||||
"description": "Provide popup to specify the type of the field serialized by the [SerializeReference] attribute in the inspector.",
|
"description": "Provide popup to specify the type of the field serialized by the [SerializeReference] attribute in the inspector.",
|
||||||
"keywords": [ "SerializeReference", "Editor" ],
|
"keywords": [ "SerializeReference", "Editor" ],
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
# Unity SerializeReferenceExtensions
|
# Unity SerializeReferenceExtensions
|
||||||
|
|
||||||
[](https://github.com/mackysoft/Unity-SerializeReferenceExtensions/actions/workflows/build.yaml)
|
[](https://github.com/mackysoft/Unity-SerializeReferenceExtensions/actions/workflows/build.yaml) [](https://github.com/mackysoft/Unity-SerializeReferenceExtensions/releases) [](https://openupm.com/packages/com.mackysoft.serializereference-extensions/)
|
||||||
[](https://github.com/mackysoft/Unity-SerializeReferenceExtensions/releases)
|
|
||||||
[](https://openupm.com/packages/com.mackysoft.serializereference-extensions/)
|
|
||||||
|
|
||||||
**Inspired by [this post](https://qiita.com/tsukimi_neko/items/7922b2433ed4d8616cce).**
|
**Inspired by [this post](https://qiita.com/tsukimi_neko/items/7922b2433ed4d8616cce).**
|
||||||
|
|
||||||
@@ -146,3 +144,11 @@ Also, [this thread](https://forum.unity.com/threads/serializereference-data-loss
|
|||||||
#### References
|
#### References
|
||||||
- https://forum.unity.com/threads/serializereference-data-loss-when-class-name-is-changed.736874/
|
- https://forum.unity.com/threads/serializereference-data-loss-when-class-name-is-changed.736874/
|
||||||
- https://issuetracker.unity3d.com/issues/serializereference-serialized-reference-data-lost-when-the-class-name-is-refactored
|
- https://issuetracker.unity3d.com/issues/serializereference-serialized-reference-data-lost-when-the-class-name-is-refactored
|
||||||
|
|
||||||
|
# <a id="help-and-contribute" href="#help-and-contribute"> ✉ Help & Contribute </a>
|
||||||
|
|
||||||
|
I welcome feature requests and bug reports in [issues](https://github.com/mackysoft/XPool/issues) and [pull requests](https://github.com/mackysoft/XPool/pulls).
|
||||||
|
|
||||||
|
If you feel that my works are worthwhile, I would greatly appreciate it if you could sponsor me.
|
||||||
|
|
||||||
|
GitHub Sponsors: https://github.com/sponsors/mackysoft
|
||||||
|
|||||||
Reference in New Issue
Block a user