Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aedc9ba824 | |||
| ac191b642d | |||
| a89eb6bb87 | |||
| 04920fadb7 | |||
| 1f76157be0 | |||
| 367bf2065c | |||
| d221744fff | |||
| ed7e30f8ae | |||
| 9b8a61429b |
@@ -44,6 +44,11 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
||||
if (splittedTypePath.Length <= 1) {
|
||||
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++) {
|
||||
string ns = namespaces[k];
|
||||
if (ns == null) {
|
||||
@@ -54,6 +59,10 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isSingleNamespace) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Add type items.
|
||||
|
||||
@@ -32,6 +32,11 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
||||
return -999;
|
||||
}
|
||||
return GetAttribute(type)?.Order ?? 0;
|
||||
}).ThenBy(type => {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
return GetAttribute(type)?.MenuName ?? type.Name;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca9acc9f5f84c144280dddaeb432eb82
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "com.mackysoft.serializereference-extensions",
|
||||
"displayName": "SerializeReference Extensions",
|
||||
"version": "1.1.5",
|
||||
"version": "1.1.7",
|
||||
"unity": "2019.4",
|
||||
"description": "Provide popup to specify the type of the field serialized by the [SerializeReference] attribute in the inspector.",
|
||||
"keywords": [ "SerializeReference", "Editor" ],
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# Unity SerializeReferenceExtensions
|
||||
|
||||
[](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/actions/workflows/build.yaml) [](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).**
|
||||
|
||||
@@ -146,3 +144,11 @@ Also, [this thread](https://forum.unity.com/threads/serializereference-data-loss
|
||||
#### References
|
||||
- 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
|
||||
|
||||
# <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