mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 01:54:35 +08:00
fix component display
This commit is contained in:
parent
6897bba150
commit
bfccfbdae7
@ -195,7 +195,15 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
GUIContent label = UnityEditorUtility.GetLabel(name);
|
GUIContent label = UnityEditorUtility.GetLabel(name);
|
||||||
EditorGUILayout.PropertyField(componentProperty, label, true);
|
if(componentProperty.propertyType == SerializedPropertyType.Generic)
|
||||||
|
{
|
||||||
|
EditorGUILayout.PropertyField(componentProperty, label, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Rect r = RectUtility.AddPadding(GUILayoutUtility.GetRect(label, EditorStyles.objectField), 0, 20f, 0, 0);
|
||||||
|
EditorGUI.PropertyField(r, componentProperty, label, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isRemoveComponent)
|
if (isRemoveComponent)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user