Search Unity

Prefab Editor

Discussion in 'Made With Unity' started by beck, Oct 7, 2013.

  1. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Hi guys, here's a simple extension I built that can really speed up your prefab editing workflow.

    It's very simple: Select a prefab, and press Ctrl+E. This opens up an empty scene and creates an instance of the prefab for you to modify. After you're done editing, simply save the scene and your changes will be applied. Don't worry about getting back to your previous scene, a little panel will pop up when you begin editing with a link back to it.

    Prefab Editor on BitBucket
    (for those of you unfamiliar with bitbucket and just want to grab it, click "download" in the lower right corner)

    I created this because I was frustrated with the prefab editing process in Unity. Editing a prefab directly only lets you go 1 transform deep, and dragging the prefab into the hierarchy or into the scene can be cumbersome. It's obviously shouldn't be used in all cases - for example, don't use it if you're working in a large scene that take a long time to load - but having this as an option has become very useful for me and I want to spread the joy :)
     
    Last edited: Oct 7, 2013
    Xaon, KWaldt, IndieAner3d and 2 others like this.
  2. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    814
    surprised no other responses, this sounds pretty handy. I've always thoughts prefabs were cumbersome to edit
     
  3. langem

    langem

    Joined:
    Mar 18, 2013
    Posts:
    73
    Realy well done and very useful!! Thanks for sharing!
     
  4. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    Dude, that's AWESOME! A load of my complex prefabs had gotten corrupted when I tried to remove scripts. This editor extension let me load up the prefabs and delete the offending components. There may not be much enthusiasm for this from the rest of the Unity community, but I'm sending you big virtual hugs/beer (delete as preference) for this share of yours. :D
     
  5. Brainswitch

    Brainswitch

    Joined:
    Apr 24, 2013
    Posts:
    270
    I haven't tried your utility, but from skimming through the code it seems like when you save a prefab in your editor it is the same as pressing Apply normally - which means all modifications to prefab instances are overwritten. When you modify a prefab in the normal Unity inspector (when the prefab is selected in the Project window) those changes are applied to all instances of the prefab but other modifications are not overwritten. Is that possible with your utility?
     
  6. kingink99

    kingink99

    Joined:
    Sep 27, 2014
    Posts:
    1
    still working very nicely and helps a lot :)
     
  7. Pangamini

    Pangamini

    Joined:
    Aug 8, 2012
    Posts:
    54
    @Brainswitch "all modifications to prefab instances are overwritten"; that's not true. Actually it's the exact opposite. When you click apply, the current values will be applied to prefab in database, but other instances will still keep their own overriden values
     
  8. EETechnology

    EETechnology

    Joined:
    Aug 15, 2015
    Posts:
    185
  9. joni-giuro

    joni-giuro

    Joined:
    Nov 21, 2013
    Posts:
    435
    Thanks!
     
  10. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    This is no longer working for me on 2017. I get duplicate objects.

    Edit: Okay, there's a new version that works. Back to Wonderful!
     
    Last edited: Jun 11, 2018