Search Unity

Tool: Edit multiple gameobjects

Discussion in 'Made With Unity' started by Babaa, Nov 22, 2010.

  1. Babaa

    Babaa

    Joined:
    Nov 24, 2009
    Posts:
    47
    Hello,

    When I saw the Unity Asset Store I got to thinking what tools I would like to have and I came up with this one. It allows the creator to edit multiple gameobjects at the same time in the inspector.

    I tried to search for another tool that does this but couldn't find one.

    • Is there another tool that does this?
    • Do you think it's useful?
    • Should I try to sell this at the Asset Store? / Would you be willing to pay for this tool?

    EDIT:

    All this is is a script that runs in the background and makes the Unity editor behave like you are expecting it to behave. Example: If I have selected 5 game objects and change the layer field to "ground", it changes the layer to "ground" for all selected objects.

    Most editors I've tried behaves this way (3ds max, torque, etc).

    UPDATE:

    After quite some work I've finally completed the extension. Please check out the video: http://www.youtube.com/watch?v=PN9LQKKyFTY
    I've submitted it to the Asset Store and if it gets accepted it will be released there. Otherwise I will release it for free, here.
     
    Last edited: Dec 8, 2010
  2. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,358
  3. Babaa

    Babaa

    Joined:
    Nov 24, 2009
    Posts:
    47
    No, atleast I don't think so. Check out my attached video in the zip file (I would normally upload it to youtube but since I'm currently located in China I can't do this). All you do with my tool is enabling it, and it runs in the background. When you then modify a parameter in the active game object this parameter get's modified on all selected objects.
     
  4. Neodrop

    Neodrop

    Joined:
    Oct 24, 2008
    Posts:
    1,358
    Baba, sorry if I'm wrong.
    Good luck to you. ;)
     
  5. JRavey

    JRavey

    Joined:
    May 12, 2009
    Posts:
    2,377
    Sounds handy.
     
  6. MrSmive

    MrSmive

    Joined:
    Oct 12, 2010
    Posts:
    428
    dang man, will take a look at this some time, it really pissed me off when i found out you cant batch edit stats, especially on my first game were i didn't use any prefabs, had to select over 300 objects one after the other and change some settings, on top of that your settings wont even save if you click directly onto another object, took about 30 objects to figure that one out lolz. So a batch editing system is a grand idea mate, good job.
     
  7. oxl

    oxl

    Joined:
    Nov 21, 2008
    Posts:
    325
    Yes, I would like to have something like that.

    --
    oxl
     
  8. Babaa

    Babaa

    Joined:
    Nov 24, 2009
    Posts:
    47
    Here is a "pre beta" if anyone is interested in trying it out:

    Just goto: Batchwindow->enable to enable the system.

    Known issues:

    1. Arrays not yet implemented, you can't modify an arrays size with the system.
    2. When moving objects in the scene window this results in unwanted behaviour.
     
    Last edited: Dec 9, 2010
  9. Jokerminator

    Jokerminator

    Joined:
    Jun 30, 2006
    Posts:
    258
    Hi,

    It doesn´t seem to work for me.. I tried to edit the breakForce of a HingeJoint Component..

    I think it would be nice to see this in the Asset Store. I was also working on something like this.. but mine is not so easy to use..

    Maybe we can put our code together ? :)
    Please send me a PM if you are interested..
     
  10. Babaa

    Babaa

    Joined:
    Nov 24, 2009
    Posts:
    47
    Editing the breakforce of a joint in Unity 3.1 is by default very "buggy/anti user friendly". You have to select the field, manually print a number and press enter to change it from it's default value "Infinity". After this you can use the spinner the second time you try. It is very possible to edit this value with the tool enabled.

    Make sure you did enable the tool by going "Batchwindow->enable" and make sure you have this window open while editing.

    ----

    Finnished the tool today and uploaded a video to youtube: (managed to get my VPN working): http://www.youtube.com/watch?v=PN9LQKKyFTY

    New features:
    • Moving objects through the scene window now behaves like expected.
    • No need to bring up a window or enable the tool. It starts running in the background as soon as it is installed.
    • Disabled batchedit on all components except transform while in play mode.

    I have submitted a request to sell it on the Asset Store and I really hope it will get accepted because I believe this really is a useful tool, and I did put a lot of work in to it.
     
  11. Babaa

    Babaa

    Joined:
    Nov 24, 2009
    Posts:
    47
    Here is a Trial version for anyone who wants to try it out. It will stop working after 23:e of December. Please tell me what you think and/or if you find any bugs.

    Instructions: Just install the package and it will run automatically in the background.

    Edit: This plugin does not work together with the Antares plugin (a very useful tool by the way) since both are overloading the default Transform Editor. You can easily fix this by moving my code in Activator.cs to the corresponding class in the Antares project.
     

    Attached Files:

    Last edited: Dec 9, 2010
  12. chadchat

    chadchat

    Joined:
    Apr 5, 2008
    Posts:
    154
    Thanks for working on this, could save a whole lot of labour.
     
  13. barskya

    barskya

    Joined:
    Feb 28, 2011
    Posts:
    4
    Where can I get a full version of this? Did it get to the store?
    If not can I get the code?

    thanks!
     
  14. OutCyder

    OutCyder

    Joined:
    Mar 19, 2009
    Posts:
    2,154
    I was waiting for this (and searched through seas and mountains) since ages.
    Didn't find anything universal... only scripts that worked for particular variables of entities.
    I think it's almost impossible to do something universal due to the complexity of the editor... but it's probably feasible for some specific very much used stuff.



    In example, change the material of many objects at once... here you have to check that there is only one material in the selected objects though or that the replaced material is a choosen one... but as a good start it could be that it only works on single material objects.

    Another useful would be change rotation, scale and position of many objects at once.
    Here you could have the option to rotate, scale and position the object by group pivot or by object pivot.
    Another option would be to offset locally the values of rotation and position, but maybe this falls off this topic.

    Another useful one would be options for import textures: how many times I need to change many textures for a single setting... all by hand.

    Same for the mesh import options.



    Anyway, for your peace of mind I think it's probably better if you aim for more scripts aimed to specific tasks as a universal one might become really tricky and buggy IMHO.
     
  15. Greymarch

    Greymarch

    Joined:
    Jun 7, 2007
    Posts:
    106
    OMG YES!!! How this isn't something that's already built into the editor I can't fathom, but a tool that allows change to multiple selected objects at once is definitely needed. Is this available in the store yet?
     
  16. Babaa

    Babaa

    Joined:
    Nov 24, 2009
    Posts:
    47
    Hello,

    It is submitted to the Unity asset store and are waiting for a review. If it get's accepted it will cost $5. Otherwise I will give it away here.

    Unity apparently had some problems with the initial review process.

    @megamaltese

    Yes, there are some things that just has to many of "special cases" that it IMO becomes impossible to make a universal script for it and be able to guarantee that it will be working without bugs and unwanted behavior. There for some things are not supported by the script. This includes "size of array". If you change one value in an array this gets applied on all gameobjects but if you change the size from 2 to 5 this only applies to the object active in the hierarchy. This is due to most of the time you do not want this to happen. For instance if you add a component to all gameobjects (this is handles automaticly by Unity) this is an array changing size and you do not want the same amount of components on all game objects. You just want to add that component to all game objects. This would suggest that the script maybe should just increment the array size with the same amount on all game objects but this usually is not what the user wants. For instance if you change the amount of materials on the renderer, and then change one material the desired behavior would be to apply that material in the array on the same position. However if array sizes is just incremented you would not have the same amount of materials and it would result in materials only being applied to some of the game objects, or on the wrong index.

    Also this script only support game objects (and obviously prefabs). Not import settings for textures, meshes and other.


    Thank you all for shown interest. Hopefully it is released soon.
     
  17. sandro

    sandro

    Joined:
    Jan 8, 2011
    Posts:
    5
    unity really miss your script! Hope they will put in the store soon!

    But while waiting this moment may you put in this forum another beta version, the last one expired or doesn't work anymore, or if there's another way to get can you tell me?

    We all really miss it!!!!!

    tx
     
    Last edited: Mar 7, 2011
  18. jrDev

    jrDev

    Joined:
    Nov 5, 2008
    Posts:
    1,678
    Oh well, I found one on the Asset Store called Editor++ which does a lot more so I guess I got what I wanted.
     
  19. Babaa

    Babaa

    Joined:
    Nov 24, 2009
    Posts:
    47
    It is now released on the Asset Store. Only $5, hope you like it.
     
  20. Linkitch

    Linkitch

    Joined:
    Jan 6, 2011
    Posts:
    11
    We just bought it at our company and it works like a charm.

    A couple of suggestions if I may;
    Adding the same support for imported models. For some reason it doesn't work on multiple fbx files (haven't tested other format). It just does the standard unity of only applying it to the top object in your selection.

    Affecting children, as a toggle checkbox or similar. Would be really useful when you have a lot of objects with children, so rather than have to manually open each parent just click the checkbox to have it affect all children as well.
    A good example would be to take 2 objects with children in them, set them to static and click yes on the dialog box. It only affected the first selected object.
     
  21. Babaa

    Babaa

    Joined:
    Nov 24, 2009
    Posts:
    47
    Hi,

    Thank you for the feedback.

    Yes, as it says in the read-me, it only works on GameObjects and Prefabs. (Since Prefabs esentially is GameObjects). Adding support for import settings for Textures, Meshes and other would be great but I don't know how much work it will be since they work fundamentally diffrent from Game Objects.

    Adding support for changing children as well is a really good suggestion. I will implement that.

    Best regards,
     
  22. Linkitch

    Linkitch

    Joined:
    Jan 6, 2011
    Posts:
    11
    Awesome, looking forward to the feature.

    Another thing that would be very nice to have, though I'm not sure if it would fit under this extension as well, but being able to properly navigate with the arrow keys in the Editor. I'll quote someone else for saying it first.
     
  23. bem13

    bem13

    Joined:
    Jul 1, 2010
    Posts:
    64
    Hi Baba,
    Seems to be an issue between BatchEdit and PlayMaker.. Selecting a gameobject with a PlayMaker FSM component slows down the editor drastically. It does not seem to be the overridden transform itself. It seems to be whenever BatchEditing.BatchEditingInterface.Enable() has been called and for the rest of that session.

    Who knows what that is about. Maybe the quickest fix would be to be able to enable/disable Batch editor though a menu option.

    (edit: note BatchEditingInterface has an Enable() and Disable() method so anyone can add a menuitem themselves if they are having this problem.. )
     
    Last edited: Jul 20, 2011
  24. Wenceslao

    Wenceslao

    Joined:
    Feb 7, 2009
    Posts:
    142
    I find that when I write my own inspectors I get similar behavior where the editor slows down significantly and if I disable one or the other, the editor goes back up to speed. I tried as the readme said and copied the code from Activator.cs but the editor was still very slow.

    I ultimately found the solution in that all my objects that I wrote a custom script for I had to add the following:

    It's a bit of a hack, but I couldn't figure out any alternative. That means that I just can't batch edit custom inspector objects for now.
     
    Last edited: Sep 14, 2011
  25. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,360
    Any news on how to get it to work nicely with playmaker?
     
unityunity