Dragging objects of different type into Unity Inspector

Hello Unity Forums,

Is there a way to define a way for the unity inspector to convert objects of a different type to the required type?

For example, if I have a field string itemID in the inspector, I want to be able to drag an Item into the inspector and have the item’s ID show up in this field. I feel like this should be possible but I haven’t found anything online regarding this.

“I want to be able to drag an Item into the inspector and have the item’s ID show up in this field. I feel like this should be possible but I haven’t found anything online regarding this.”

Check OnValidate().