From 4a18d41b97e531eb1fca737e9237fa9027f69ab1 Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Fri, 17 May 2024 00:50:05 +0800 Subject: [PATCH 1/2] fix --- .../Editor/ComponentTemplatePropertyDrawer.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/EntityTemplate/Editor/ComponentTemplatePropertyDrawer.cs b/src/EntityTemplate/Editor/ComponentTemplatePropertyDrawer.cs index 3546089..64f7f3e 100644 --- a/src/EntityTemplate/Editor/ComponentTemplatePropertyDrawer.cs +++ b/src/EntityTemplate/Editor/ComponentTemplatePropertyDrawer.cs @@ -82,6 +82,10 @@ namespace DCFApixels.DragonECS.Unity.Editors public override float GetPropertyHeight(SerializedProperty property, GUIContent label) { + if(property.propertyType == SerializedPropertyType.ManagedReference == false) + { + return EditorGUI.GetPropertyHeight(property, label); + } IComponentTemplate template = property.managedReferenceValue as IComponentTemplate; if (template == null || property.managedReferenceValue == null) { @@ -114,6 +118,12 @@ namespace DCFApixels.DragonECS.Unity.Editors public override void OnGUI(Rect position, SerializedProperty componentRefProp, GUIContent label) { + if (componentRefProp.propertyType == SerializedPropertyType.ManagedReference == false) + { + EditorGUI.PropertyField(position, componentRefProp, label, true); + return; + } + Init(); var counter = componentRefProp.Copy(); From 351955454cb7132fecb5027d67c4781e2a0af31d Mon Sep 17 00:00:00 2001 From: Mikhail <99481254+DCFApixels@users.noreply.github.com> Date: Fri, 17 May 2024 00:50:27 +0800 Subject: [PATCH 2/2] up version to 0.3.20 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ff23ab7..9cb6168 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "displayName": "DragonECS-Unity", "description": "Integration with Unity for DragonECS", "unity": "2021.2", - "version": "0.3.19", + "version": "0.3.20", "repository": { "type": "git", "url": "https://github.com/DCFApixels/DragonECS-Unity.git"