Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Prefab saving question

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

  1. fstim82


    May 4, 2010
    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

    Mar 28, 2009
    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.
    Kryptos_Republic likes this.
  3. kilik128


    Jul 15, 2013
    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


    Nov 13, 2013
    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.
    arunantony likes this.