I have a custom editor I’m using for a custom object. Right now I can drag an object into that field and immediately add it to a list as so:
customObject = EditorGUILayout.ObjectField("Drag Element Here to Add",
customObject, typeof(Element), false) as Element;
if (customObject != null) {
if (!objectList.Contains(customObject)) {
objectList.Add(customObject);
customObject = null;
} else {
Debug.Log(customObject.name + " is already in the list.");
customObject = null;
}
}
I can’t seem to drag and drop more than one thing in, no matter what I’ve tried (like using a list customObject instead of just a single object), but I’ve seen it done (for instance with 2dTK). How?