1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. Unity 2017.1 beta is now available for download.
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Get further faster with the Unity Plus Accelerator Pack, free for new Unity Plus subscribers for a limited time. Click here for more details.
    Dismiss Notice
  7. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  8. Learn how you'll soon be able to publish your games to China in four simple steps with Xiaomi. Sign up now for early access.
    Dismiss Notice

Prefab saving question

Discussion in 'Editor & General Support' started by fstim82, May 4, 2010.

  1. fstim82

    fstim82

    Joined:
    May 4, 2010
    Posts:
    27
    I'm new to Unity. I've been tasked with adding functionality to a game options menu object and so I'm adding some sliders and check boxes, etc. The menu is instantiated in code, which loads the menu prefab. To add the items, I've added the prefab to a random scene, thinking I'd change the prefab, save it, and revert the scene. I can't seem to figure out how to save the prefab changes though. I've added the changes I need, so how do I save the .prefab file?
     
  2. Ramen Sama

    Ramen Sama

    Joined:
    Mar 28, 2009
    Posts:
    561
    Well, if the game object in your scene editor is shown as blue, it's currently linked to a prefab. if not, it's not a prefab you're editing anymore.

    Create a new prefab in your project folder in unity. then drag your object from the hierarchical view onto the newprefab. this will create a new prefab. Or if you have a prefab already, drag and drop it ontop of it.

    http://unity3d.com/support/documentation/Manual/Prefabs.html
     
  3. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    705
    Hi i look for save 2 prefab at same time for more easy editing
    i have check Google and is look hard to find anyone can help
    please thank's
     
  4. victorbisaev

    victorbisaev

    Joined:
    Nov 13, 2013
    Posts:
    1
    When you edit an instance of a prefab, changes do not save to the prefab. So to save the changes (and thus propagate them to all the other instances of the same prefab) just grab the newly edited instance of the prefab and drag-drop it into the prefab (the same prefab) in the 'Project' window of Unity. This action will replace the original prefab with edited one and update all existing instances of the prefab in your scene.
    In short, drag the instance from 'Hierarchy' back to 'Project' as you do when you initially create the content of the prefab.