Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

An editor script for reordering the components in your game objects

Discussion in 'Works In Progress - Archive' started by AnomalusUndrdog, Apr 24, 2012.

  1. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    This is a very very crude implementation on the idea of re-ordering your components. This doesn't change script execution order in any way, it is only for re-ordering as you see it in the Inspector.



    Git repository here: https://bitbucket.org/AnomalousUnderdog/componenttoolbox
    Download here: https://bitbucket.org/AnomalousUnderdog/componenttoolbox/get/master.zip

    Its the best I can do given the circumstances. There really is no command to allow you to re-order components.

    What this does is delete all your components, then make new ones, in the order that you want, and repopulate them with the proper values.

    This means if your script has a RequireComponent, and it tried to delete something that has a dependency, it won't work. If your component is being referenced elsewhere in other game objects, the reference will break (since it was deleted), and you will have to re-assign it manually (re-assigning at least, can be automated, but can be slow).

    Anyway, it is just a proof-of-concept.

    Also, cut/copy/paste of components can easily be added, but I don't have the time right now, hence, why I'm releasing it as open-source (MIT license).
     
  2. LeakySink

    LeakySink

    Joined:
    Apr 9, 2012
    Posts:
    141
    They really need something like this integrated into the editor, its pretty inconvenient.
     
  3. thienhaflash

    thienhaflash

    Joined:
    Jun 16, 2012
    Posts:
    513
    I'm working on an extension to add more features to Project Panel, this one is include, you will be able to drag and drop a component to the place you want, tell me if you want a beta version as I haven't yet finish the documentation to upload to assetstore, will takes some more days, though.