keep forget how to do this, keep a simple template here.
idea : use property’s path to locate targetobjects(array)’s relative property.
so we can editor the property one by one.
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) { if (property.serializedObject.isEditingMultipleObjects) { foreach(var to in property.serializedObject.targetObjects) { // Handle multi selection in property drawer if (to is Component comp) { var pPath = property.propertyPath; var realProperty = new SerializedObject(comp)?.FindProperty(pPath); Debug.Log(realProperty); } else if (to is ScriptableObject so) { // TODO: } else { EditorGUI.HelpBox(position, "Not support multiple object(s)", MessageType.Warning); } } EditorGUI.HelpBox(position, "Not support multiple object(s)", MessageType.Warning); return; } }