Custom inspector to re-order components

Hey guys,
one thing I don’t like about the default inspector is the inability to re-order components by either drag & drop or using buttons.

I want to write a custom inspector class which would let me re-arrange all the components attached to a game object by either dragging them up&down or by having 2 buttons next to each component, with an up&down arrow on them.

I have written a few custom inspector scripts before, but nothing too fancy, and I’m not really sure how to achieve this. Could any of you point me in the right direction, or give me a small example perhaps?

I don’t want to use an existing script, because I want to learn and do it myself, so any help is very welcomed!

Thanks for your time,
Stephane

What I did is get a plugin which does exactly that (except that it was broken and didn’t work anymore), looked at it’s code and saw how it was made.

I wrote a plugin which does exactly what you need. It’s on the asset store and it costs $2:

Hi! I just published this little utility on the Asset Store to make the reordering of components less painfully.
Hope you like it :wink: