public override void OnInspectorGUI() { serializedObject.Update(); foreach (var property in _serializedProperties) { if (property.name.Equals("m_Script", System.StringComparison.Ordinal)) { using (new GUIEnabled(false)) { EditorGUILayout.PropertyField(property); } } else { if (property.isArray && property.propertyType != SerializedPropertyType.String) { ReorderableListPropertyDrawer.Draw(property); } else { EditorGUILayout.PropertyField(property, true); } } } serializedObject.ApplyModifiedProperties(); }
private void OnDisable() { foreach (var property in _serializedProperties) { if (property.isArray && property.propertyType != SerializedPropertyType.String) { ReorderableListPropertyDrawer.Dispose(property); } } }