Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

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:
    769
    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:
    72
    Realy well done and very useful!! Thanks for sharing!
     
  4. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    459
    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:
    36
    @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:
    427
    Thanks!
     
  10. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    459
    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