Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3386bbbb93 | |||
| 522393cd91 | |||
| e61a077f9c | |||
| 2dfbdc0405 | |||
| 60adb3e3d3 | |||
| 0b79cd7e40 | |||
| d9bc19329f | |||
| 6d39db142a | |||
| 97d028ef2a | |||
| 9df6eae13c | |||
| 8f4e361790 | |||
| 83b67afcc2 | |||
| 4cac61d3ed | |||
| 6269f7f67a | |||
| 63d2d94953 | |||
| 71fa059b0c | |||
| b7d76fb0c5 | |||
| 69943b46c8 | |||
| 66fc5ae911 | |||
| 1757747985 | |||
| 69f6e31cf1 | |||
| 3ffef8d1b2 | |||
| a9763b033d | |||
| 2b40c3d26e | |||
| f7c1017567 | |||
| 301cb4b12c | |||
| fe02e0fd1e |
@@ -14,7 +14,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Checkout
|
# Checkout
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
lfs: true
|
lfs: true
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
# Upload
|
# Upload
|
||||||
- name: Upload .unitypackage
|
- name: Upload .unitypackage
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Unity Package
|
name: Unity Package
|
||||||
path: Build
|
path: Build
|
||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
sha: ${{ steps.commit.outputs.sha }}
|
sha: ${{ steps.commit.outputs.sha }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Output package.json (Before)
|
- name: Output package.json (Before)
|
||||||
run: cat ${{ env.TARGET_FILE}}
|
run: cat ${{ env.TARGET_FILE}}
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- run: echo ${{ needs.update-packagejson.outputs.sha }}
|
- run: echo ${{ needs.update-packagejson.outputs.sha }}
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ needs.update-packagejson.outputs.sha }}
|
ref: ${{ needs.update-packagejson.outputs.sha }}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
working-directory: .
|
working-directory: .
|
||||||
|
|
||||||
# Store artifacts.
|
# Store artifacts.
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: SerializeReference-Extensions.unitypackage
|
name: SerializeReference-Extensions.unitypackage
|
||||||
path: ./Build/SerializeReference-Extensions.unitypackage
|
path: ./Build/SerializeReference-Extensions.unitypackage
|
||||||
@@ -119,7 +119,7 @@ jobs:
|
|||||||
prerelease: false
|
prerelease: false
|
||||||
|
|
||||||
# Download(All) Artifacts to current directory
|
# Download(All) Artifacts to current directory
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v4
|
||||||
|
|
||||||
# Upload to Releases(unitypackage)
|
# Upload to Releases(unitypackage)
|
||||||
- uses: actions/upload-release-asset@v1
|
- uses: actions/upload-release-asset@v1
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
@@ -42,6 +41,17 @@ public class Grape : Food
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
[HideInTypeMenu]
|
||||||
|
public class Banana : Food
|
||||||
|
{
|
||||||
|
public Banana ()
|
||||||
|
{
|
||||||
|
name = "Banana";
|
||||||
|
kcal = 100f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public class Example : MonoBehaviour
|
public class Example : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -60,7 +70,8 @@ public class Example : MonoBehaviour
|
|||||||
[SerializeReference, SubclassSelector]
|
[SerializeReference, SubclassSelector]
|
||||||
public Food foodTwo = new Peach();
|
public Food foodTwo = new Peach();
|
||||||
|
|
||||||
[SerializeReference, SubclassSelector]
|
// UseToStringAsLabel support on UNITY_2021_3_OR_NEWER
|
||||||
|
[SerializeReference, SubclassSelector(UseToStringAsLabel = true)]
|
||||||
public Food foodThree = new Grape();
|
public Food foodThree = new Grape();
|
||||||
|
|
||||||
[SerializeReference]
|
[SerializeReference]
|
||||||
@@ -116,5 +127,3 @@ public class AppleDrawer : PropertyDrawer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
using System;
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@@ -138,4 +137,3 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
+1
-3
@@ -12,9 +12,7 @@
|
|||||||
"overrideReferences": false,
|
"overrideReferences": false,
|
||||||
"precompiledReferences": [],
|
"precompiledReferences": [],
|
||||||
"autoReferenced": true,
|
"autoReferenced": true,
|
||||||
"defineConstraints": [
|
"defineConstraints": [],
|
||||||
"UNITY_2019_3_OR_NEWER"
|
|
||||||
],
|
|
||||||
"versionDefines": [],
|
"versionDefines": [],
|
||||||
"noEngineReferences": false
|
"noEngineReferences": false
|
||||||
}
|
}
|
||||||
+1
-3
@@ -1,5 +1,4 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
using System;
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@@ -45,4 +44,3 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
+29
-33
@@ -1,5 +1,4 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -27,48 +26,46 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
{
|
{
|
||||||
Type[] interfaceTypes = type.GetInterfaces();
|
Type[] interfaceTypes = type.GetInterfaces();
|
||||||
|
|
||||||
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
|
var types = TypeCache.GetTypesWithAttribute<CustomPropertyDrawer>();
|
||||||
|
foreach (Type drawerType in types)
|
||||||
{
|
{
|
||||||
foreach (Type drawerType in assembly.GetTypes())
|
var customPropertyDrawerAttributes = drawerType.GetCustomAttributes(typeof(CustomPropertyDrawer), true);
|
||||||
|
foreach (CustomPropertyDrawer customPropertyDrawer in customPropertyDrawerAttributes)
|
||||||
{
|
{
|
||||||
var customPropertyDrawerAttributes = drawerType.GetCustomAttributes(typeof(CustomPropertyDrawer), true);
|
var field = customPropertyDrawer.GetType().GetField("m_Type", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||||
foreach (CustomPropertyDrawer customPropertyDrawer in customPropertyDrawerAttributes)
|
if (field != null)
|
||||||
{
|
{
|
||||||
var field = customPropertyDrawer.GetType().GetField("m_Type", BindingFlags.NonPublic | BindingFlags.Instance);
|
var fieldType = field.GetValue(customPropertyDrawer) as Type;
|
||||||
if (field != null)
|
if (fieldType != null)
|
||||||
{
|
{
|
||||||
var fieldType = field.GetValue(customPropertyDrawer) as Type;
|
if (fieldType == type)
|
||||||
if (fieldType != null)
|
|
||||||
{
|
{
|
||||||
if (fieldType == type)
|
return drawerType;
|
||||||
{
|
}
|
||||||
return drawerType;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the property drawer also allows for being applied to child classes, check if they match
|
// If the property drawer also allows for being applied to child classes, check if they match
|
||||||
var useForChildrenField = customPropertyDrawer.GetType().GetField("m_UseForChildren", BindingFlags.NonPublic | BindingFlags.Instance);
|
var useForChildrenField = customPropertyDrawer.GetType().GetField("m_UseForChildren", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||||
if (useForChildrenField != null)
|
if (useForChildrenField != null)
|
||||||
|
{
|
||||||
|
object useForChildrenValue = useForChildrenField.GetValue(customPropertyDrawer);
|
||||||
|
if (useForChildrenValue is bool && (bool)useForChildrenValue)
|
||||||
{
|
{
|
||||||
object useForChildrenValue = useForChildrenField.GetValue(customPropertyDrawer);
|
// Check interfaces
|
||||||
if (useForChildrenValue is bool && (bool)useForChildrenValue)
|
if (Array.Exists(interfaceTypes, interfaceType => interfaceType == fieldType))
|
||||||
{
|
{
|
||||||
// Check interfaces
|
return drawerType;
|
||||||
if (Array.Exists(interfaceTypes, interfaceType => interfaceType == fieldType))
|
}
|
||||||
|
|
||||||
|
// Check derived types
|
||||||
|
Type baseType = type.BaseType;
|
||||||
|
while (baseType != null)
|
||||||
|
{
|
||||||
|
if (baseType == fieldType)
|
||||||
{
|
{
|
||||||
return drawerType;
|
return drawerType;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check derived types
|
baseType = baseType.BaseType;
|
||||||
Type baseType = type.BaseType;
|
|
||||||
while (baseType != null)
|
|
||||||
{
|
|
||||||
if (baseType == fieldType)
|
|
||||||
{
|
|
||||||
return drawerType;
|
|
||||||
}
|
|
||||||
|
|
||||||
baseType = baseType.BaseType;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,4 +78,3 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
+1
-3
@@ -1,5 +1,4 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
||||||
namespace MackySoft.SerializeReferenceExtensions.Editor
|
namespace MackySoft.SerializeReferenceExtensions.Editor
|
||||||
@@ -28,4 +27,3 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
+22
-11
@@ -1,5 +1,4 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
using System;
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@@ -22,7 +21,7 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
}
|
}
|
||||||
|
|
||||||
const int k_MaxTypePopupLineCount = 13;
|
const int k_MaxTypePopupLineCount = 13;
|
||||||
static readonly Type k_UnityObjectType = typeof(UnityEngine.Object);
|
|
||||||
static readonly GUIContent k_NullDisplayName = new GUIContent(TypeMenuUtility.k_NullDisplayName);
|
static readonly GUIContent k_NullDisplayName = new GUIContent(TypeMenuUtility.k_NullDisplayName);
|
||||||
static readonly GUIContent k_IsNotManagedReferenceLabel = new GUIContent("The property type is not manage reference.");
|
static readonly GUIContent k_IsNotManagedReferenceLabel = new GUIContent("The property type is not manage reference.");
|
||||||
|
|
||||||
@@ -43,6 +42,19 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
foldoutLabelRect = EditorGUI.IndentedRect(foldoutLabelRect);
|
foldoutLabelRect = EditorGUI.IndentedRect(foldoutLabelRect);
|
||||||
Rect popupPosition = EditorGUI.PrefixLabel(foldoutLabelRect, label);
|
Rect popupPosition = EditorGUI.PrefixLabel(foldoutLabelRect, label);
|
||||||
|
|
||||||
|
#if UNITY_2021_3_OR_NEWER
|
||||||
|
// Override the label text with the ToString() of the managed reference.
|
||||||
|
var subclassSelectorAttribute = (SubclassSelectorAttribute)attribute;
|
||||||
|
if (subclassSelectorAttribute.UseToStringAsLabel && !property.hasMultipleDifferentValues)
|
||||||
|
{
|
||||||
|
object managedReferenceValue = property.managedReferenceValue;
|
||||||
|
if (managedReferenceValue != null)
|
||||||
|
{
|
||||||
|
label.text = managedReferenceValue.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Draw the subclass selector popup.
|
// Draw the subclass selector popup.
|
||||||
if (EditorGUI.DropdownButton(popupPosition, GetTypeName(property), FocusType.Keyboard))
|
if (EditorGUI.DropdownButton(popupPosition, GetTypeName(property), FocusType.Keyboard))
|
||||||
{
|
{
|
||||||
@@ -56,7 +68,13 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
{
|
{
|
||||||
Rect foldoutRect = new Rect(position);
|
Rect foldoutRect = new Rect(position);
|
||||||
foldoutRect.height = EditorGUIUtility.singleLineHeight;
|
foldoutRect.height = EditorGUIUtility.singleLineHeight;
|
||||||
|
|
||||||
|
#if UNITY_2022_2
|
||||||
|
// NOTE: Position x must be adjusted.
|
||||||
|
// FIXME: Is there a more essential solution...?
|
||||||
foldoutRect.x -= 12;
|
foldoutRect.x -= 12;
|
||||||
|
#endif
|
||||||
|
|
||||||
property.isExpanded = EditorGUI.Foldout(foldoutRect, property.isExpanded, GUIContent.none, true);
|
property.isExpanded = EditorGUI.Foldout(foldoutRect, property.isExpanded, GUIContent.none, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,13 +141,7 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
|
|
||||||
Type baseType = ManagedReferenceUtility.GetType(managedReferenceFieldTypename);
|
Type baseType = ManagedReferenceUtility.GetType(managedReferenceFieldTypename);
|
||||||
var popup = new AdvancedTypePopup(
|
var popup = new AdvancedTypePopup(
|
||||||
TypeCache.GetTypesDerivedFrom(baseType).Append(baseType).Where(p =>
|
TypeMenuUtility.GetTypes(baseType),
|
||||||
(p.IsPublic || p.IsNestedPublic) &&
|
|
||||||
!p.IsAbstract &&
|
|
||||||
!p.IsGenericType &&
|
|
||||||
!k_UnityObjectType.IsAssignableFrom(p) &&
|
|
||||||
Attribute.IsDefined(p,typeof(SerializableAttribute))
|
|
||||||
),
|
|
||||||
k_MaxTypePopupLineCount,
|
k_MaxTypePopupLineCount,
|
||||||
state
|
state
|
||||||
);
|
);
|
||||||
@@ -199,4 +211,3 @@ namespace MackySoft.SerializeReferenceExtensions.Editor
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
@@ -1,12 +1,25 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
using System;
|
||||||
using System;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
namespace MackySoft.SerializeReferenceExtensions.Editor {
|
namespace MackySoft.SerializeReferenceExtensions.Editor {
|
||||||
public static class TypeMenuUtility {
|
public static class TypeMenuUtility {
|
||||||
|
|
||||||
public const string k_NullDisplayName = "<null>";
|
public const string k_NullDisplayName = "<null>";
|
||||||
|
static readonly Type k_UnityObjectType = typeof(UnityEngine.Object);
|
||||||
|
|
||||||
|
public static IEnumerable<Type> GetTypes (Type baseType)
|
||||||
|
{
|
||||||
|
return TypeCache.GetTypesDerivedFrom(baseType).Append(baseType).Where(p =>
|
||||||
|
(p.IsPublic || p.IsNestedPublic || p.IsNestedPrivate) &&
|
||||||
|
!p.IsAbstract &&
|
||||||
|
!p.IsGenericType &&
|
||||||
|
!k_UnityObjectType.IsAssignableFrom(p) &&
|
||||||
|
Attribute.IsDefined(p, typeof(SerializableAttribute)) &&
|
||||||
|
!Attribute.IsDefined(p, typeof(HideInTypeMenuAttribute))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public static AddTypeMenuAttribute GetAttribute (Type type) {
|
public static AddTypeMenuAttribute GetAttribute (Type type) {
|
||||||
return Attribute.GetCustomAttribute(type,typeof(AddTypeMenuAttribute)) as AddTypeMenuAttribute;
|
return Attribute.GetCustomAttribute(type,typeof(AddTypeMenuAttribute)) as AddTypeMenuAttribute;
|
||||||
@@ -42,4 +55,3 @@ namespace MackySoft.SerializeReferenceExtensions.Editor {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
+1
-4
@@ -1,6 +1,4 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
using System;
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An attribute that overrides the name of the type displayed in the SubclassSelector popup.
|
/// An attribute that overrides the name of the type displayed in the SubclassSelector popup.
|
||||||
@@ -35,4 +33,3 @@ public sealed class AddTypeMenuAttribute : Attribute {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An attribute that hides the type in the SubclassSelector.
|
||||||
|
/// </summary>
|
||||||
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
|
||||||
|
public sealed class HideInTypeMenuAttribute : Attribute {
|
||||||
|
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 9f48f5d86a108b94a9c26381f5ce678c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
+1
-3
@@ -8,9 +8,7 @@
|
|||||||
"overrideReferences": false,
|
"overrideReferences": false,
|
||||||
"precompiledReferences": [],
|
"precompiledReferences": [],
|
||||||
"autoReferenced": true,
|
"autoReferenced": true,
|
||||||
"defineConstraints": [
|
"defineConstraints": [],
|
||||||
"UNITY_2019_3_OR_NEWER"
|
|
||||||
],
|
|
||||||
"versionDefines": [],
|
"versionDefines": [],
|
||||||
"noEngineReferences": false
|
"noEngineReferences": false
|
||||||
}
|
}
|
||||||
+9
-5
@@ -1,12 +1,16 @@
|
|||||||
#if UNITY_2019_3_OR_NEWER
|
using System;
|
||||||
using System;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attribute to specify the type of the field serialized by the SerializeReference attribute in the inspector.
|
/// Attribute to specify the type of the field serialized by the SerializeReference attribute in the inspector.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[AttributeUsage(AttributeTargets.Field,AllowMultiple = false)]
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
|
||||||
public sealed class SubclassSelectorAttribute : PropertyAttribute {
|
public sealed class SubclassSelectorAttribute : PropertyAttribute
|
||||||
|
{
|
||||||
|
|
||||||
|
#if UNITY_2021_3_OR_NEWER
|
||||||
|
// NOTE: Use managedReferenceValue getter to invoke instance method in SubclassSelectorDrawer.
|
||||||
|
public bool UseToStringAsLabel { get; set; }
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.mackysoft.serializereference-extensions",
|
"name": "com.mackysoft.serializereference-extensions",
|
||||||
"displayName": "SerializeReference Extensions",
|
"displayName": "SerializeReference Extensions",
|
||||||
"author": { "name": "MackySoft", "url": "https://github.com/mackysoft" },
|
"author": { "name": "MackySoft", "url": "https://github.com/mackysoft" },
|
||||||
"version": "1.3.0",
|
"version": "1.5.0",
|
||||||
"unity": "2021.3",
|
"unity": "2021.3",
|
||||||
"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,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"com.unity.ide.rider": "3.0.24",
|
"com.unity.ide.rider": "3.0.28",
|
||||||
"com.unity.ide.visualstudio": "2.0.18",
|
"com.unity.ide.visualstudio": "2.0.22",
|
||||||
"com.unity.ide.vscode": "1.2.5",
|
"com.unity.ide.vscode": "1.2.5",
|
||||||
"com.unity.test-framework": "1.1.33",
|
"com.unity.test-framework": "1.1.33",
|
||||||
"com.unity.modules.ai": "1.0.0",
|
"com.unity.modules.ai": "1.0.0",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ide.rider": {
|
"com.unity.ide.rider": {
|
||||||
"version": "3.0.24",
|
"version": "3.0.28",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
"com.unity.ide.visualstudio": {
|
"com.unity.ide.visualstudio": {
|
||||||
"version": "2.0.18",
|
"version": "2.0.22",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ The `SubclassSelector` attribute allows you to easily set subclasses of those ab
|
|||||||
- **[New]** Available `CustomPropertyDrawer` for subclasses.
|
- **[New]** Available `CustomPropertyDrawer` for subclasses.
|
||||||
- **[New]** Restore values of previous object from JSON when subclass is changed. (required Unity 2021.3 or later)
|
- **[New]** Restore values of previous object from JSON when subclass is changed. (required Unity 2021.3 or later)
|
||||||
- **[New]** Copy & Paste the subclass properties. (required Unity 2021.3 or later)
|
- **[New]** Copy & Paste the subclass properties. (required Unity 2021.3 or later)
|
||||||
|
- **[New]** Clear & reset the subclass properties. (required Unity 2021.3 or later)
|
||||||
|
|
||||||
> See below for the reason for the limitation of versions less than Unity 2021.3.
|
> See below for the reason for the limitation of versions less than Unity 2021.3.
|
||||||
>
|
>
|
||||||
@@ -138,7 +139,7 @@ public struct StructCommand : ICommand {
|
|||||||
|
|
||||||
The `SubclassSelector` attribute supports types that meet the following conditions.
|
The `SubclassSelector` attribute supports types that meet the following conditions.
|
||||||
|
|
||||||
- Public
|
- Public or nested private
|
||||||
- Not abstract
|
- Not abstract
|
||||||
- Not generic
|
- Not generic
|
||||||
- Not unity object
|
- Not unity object
|
||||||
|
|||||||
Reference in New Issue
Block a user