Search Unity

  1. Unity 2018.3 is now released.
    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. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

How to move a child out of prefab?

Discussion in 'Prefabs' started by N1warhead, Jan 2, 2019.

  1. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,326
    No matter what I do I can't seem to unchild an object from a prefab. How would I go about removing an item from prefab to then be a separate item in my Hierarchy. At least before I could just click + drag and drop from the prefab and done.
     
  2. Zephus

    Zephus

    Joined:
    May 25, 2015
    Posts:
    169
    I'm actually interested in the intended way to do this as well. You can duplicate the GameObject and paste it outside of the prefab, but I have no idea how to move it out directly.
     
  3. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    365
    What happens when you click and drag a child object?
     
  4. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,326
    It tells me to go to the prefab menu thing (that new menu) that you can open in the hierarchy for the prefab.
    So I go in there, I can delete item from it, but I can't remove it. Even did the right click on it and hit the unpack prefab thing, not sure what that is, but sounds about right - didn't do anything.
     
  5. Zephus

    Zephus

    Joined:
    May 25, 2015
    Posts:
    169
    This happens:


    This is pretty annoying since it happens to me fairly often that I just want to move a child out of my prefab and save the prefab without the child.
     
    N1warhead likes this.
  6. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    365
    @Zephus Just press "Open Prefab" delete the GameObject and exit prefab mode. The new workflow is a lot safer this way because it does not deal with the old concept of disconnected prefab which does not work with nesting.

    @N1warhead
    This makes no sense. You say it is deleted but not removed??
     
  7. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,326
    What I meant was, I can delete an object yes. But I can't just move it off the prefab. The only way around it now is to drag and drop the original FBX and re-build everything from scratch....

    For example..
    I drag a tree FBX onto my scene, I make the tree a child of an empty and save it as a prefab. But later decide I no longer want it to be a child, if I go to drag it off the parent - i'm screwed because it doesn't allow you too. I have to then go back and find the FBX, drag it onto the scene and then re-save it as another prefab.

    Yeah, it really is much safer, it prevents us from doing quick things that made Unity easy to work with before. Unless there's of course - an option to just unchild an object, which is what we're all asking. If there isn't, y'all should really add this ability into it, or at the very least make the new prefab system optional, or add this feature.
     
  8. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    365
    Before you can move the Models away from the empty GameObject you need to Unpack the empty GameObject.
    You can do this from the Context menu of the GameObject.
     

    Attached Files:

  9. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,326
    I tried that as well. Didn't allow me too. Perhaps it was a bug. But I saw that and clicked that as well, didn't change anything. But it may very well be a bug, because the other day when installing 2018.3 I accidentally went into that prefab hierarchy window and it wouldn't ever let me escape lol. I had to exit Unity and go back in to get regular scene hierarchy back. So perhaps what I did was get a bug.
     
  10. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    365
    What do you mean that it didn't allow you to unpack the prefab?
     
  11. MatthieuPr

    MatthieuPr

    Joined:
    May 4, 2017
    Posts:
    53
    What happens if you open the empty prefab and just drag your tree to become a new prefab (drag it into project)?
    It should create a new prefab of that tree, after that you can just delete the old prefab...
     
  12. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,326
    It means nothing happened. The prefab hierarchy did in fact turn grey. But that still didn't allow me to drag and drop a child off the prefab, neither on the prefab hierarchy nor in the scene hierarchy. The prefab hierarchy did turn grey, but in the scene hierarchy it stayed blue, so I still wasn't able to move it out in neither hierarchy's.
     
  13. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    365
    @N1warhead

    This makes no sense, can you share a video or file a bug report with attached project and exact steps to reproduce please? If you file a bug report please share the case number then I can quickly take a look instead of waiting for QA to process the bug.