Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 99163c1

Browse files
Fixed some issues with the RuntimeSetEiditor
1 parent bb6b300 commit 99163c1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Assets/SO Architecture/Editor/Inspectors/RuntimeSetEditor.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ private void OnEnable()
1818

1919
_targetType = Target.GetType().BaseType.GetGenericArguments()[0];
2020

21-
_reorderableList = new ReorderableList(items.serializedObject, items);
21+
_reorderableList = new ReorderableList(serializedObject, items);
2222
_reorderableList.drawElementCallback += DrawElement;
2323
}
2424
public override void OnInspectorGUI()
2525
{
2626
_reorderableList.DoLayoutList();
2727

2828
EditorGUILayout.PropertyField(DeveloperDescription);
29-
29+
3030
_reorderableList.serializedProperty.serializedObject.ApplyModifiedProperties();
3131
}
3232
private void DrawElement(Rect rect, int index, bool isActive, bool isFocused)
@@ -35,11 +35,10 @@ private void DrawElement(Rect rect, int index, bool isActive, bool isFocused)
3535
rect.y++;
3636

3737
SerializedProperty property = _reorderableList.serializedProperty.GetArrayElementAtIndex(index);
38-
3938

40-
if(property.propertyType == SerializedPropertyType.ObjectReference)
39+
if(Application.isPlaying)
4140
{
42-
property.objectReferenceValue = EditorGUI.ObjectField(rect, "Element " + index, property.objectReferenceValue, _targetType, true);
41+
EditorGUI.ObjectField(rect, "Element " + index, property.objectReferenceValue, _targetType, true);
4342
}
4443
else
4544
{

0 commit comments

Comments
 (0)