Custom Editor DragAndDrop for List

Hi Guys,

I’ve been searching through answers and the forum to find a DragAndDrop example for a custom editor of a list. While I’ve managed to find a few links, they either don’t work, are ridiculously complicated or lead to old links and dead ends; and the documentation offers such little help on this too.

If anyone has the time to do a quick example of this, ideally something similar to the Transitions list in the animator or the Clips in the Animators tab of a model. I’m not even sure of where to start using the Drags as the editor gives me “Drags can only be started from MouseDown or MouseDrag events”, I can’t even find how to set those up in the editor either, they only seems to respond to a Click event when using:

if(GUILayout.Button("T")){

Sorry for requesting so much!

Thanks in advance!

You could inspect the Mecanim editor stuff yourself (e.g. MonoDevelop’s Assembly Inspector). Also, rotorz did a good job on drag and drop for lists.