Search Unity

  1. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  2. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  3. If you couldn't join the live stream, take a peek at what you missed.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. 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:
    748
    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:
    69
    Realy well done and very useful!! Thanks for sharing!
     
  4. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    444
    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:
    426
    Thanks!
     
  10. SoftwareGeezers

    SoftwareGeezers

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