Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Deleting Child of Prefab

Discussion in 'Prefabs' started by Hawk0077, Oct 4, 2018.

  1. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi, I am relatively new to unity and decided to test the latest beta version out.

    Problem is it seems incredibly complex to delete or move items within a prefab. I open the prefab in Prefab Mode because it states I cannot delete an item or move an item.? Its kinda rediculous from the perspective I am looking at... I can no longer move parts of a city around (buildings etc) because I have to open them in Prefab Mode.

    I just opened the prefab mode then deleted a river (child within the prefab) but it doesnt get deleted?

    What am I doing wrong?

    I tried clicking SAVE in prefab mode as well as Auto Save but nothing deletes the river.

    Also I really need to move buildings and delete them but this all seems a kinda joke now.

    Apologies but I am no unity expert and what was once easy has now become undoable?

    Any guidance appreciated.

    Thanks
     
  2. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,147
    How did you end up solving that?
     
    Hawk0077 likes this.
  3. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    It is quite an easy system when you get used to it.

    Although I have changed my workflow a little. Previously I edited a prefab within the "Hierarchy" window. Now I edit the prefab in the "Project" window.

    Just click and open the prefab and make your edits. This will open the prefab in a window of its own (prefab window)... you then delete the children or make edits etc... then back out of the prefab window (tope left arrow/backarrow). If auto save is on in the top right of the window the prefab has saved your changes. DONE!

    You can also do this from the "Heirarchy" window but then this doesnt always save the changes. I believe that is because the changes were made to a "prefab Variant" and not the "Original" prefab.

    This was the awkward part for me.

    When dragged prefabs from your scene into the project window "to create prefabs" you are asked if you want to create an Original (UNIQUE) prefab or a Variant of the original. I believe that this is important because if you edit an Original Prefab all of the VARIANTS are likewise changed.. For instance if you want to change the color of the prefab... all are changed.

    At the moment I am just dealing with Original (UNIQUE) prefabs so don't have to worry about the Variant system yet.

    Hope that helps.
     
    Cherry231 and Baykus like this.
  4. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    943
    I think what he means, and that really seems to be a step backwards, is that you cannot have scene-overrides for hierarchy changes, like for components. If you want to change the order of objects you have to create a variant, which is not a good workflow.
     
    Cherry231, ammirea and Hawk0077 like this.
  5. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Exactly, but I am used to it now and its no more difficult than it was previously.
     
  6. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    943
    But you'll be creating potentially _a lot_ of variants along the way, cluttering your project folder, too. Until at some point it may raise the question why nested prefabs and scenes are still different concepts.
     
  7. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I don't understand the deeper levels of unity stuff but at present I am creating Original Prefabs to use and so previous originals can be deleted as I go so it doesnt matter to me personally at present.