Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity 5.3+ - Prefabs DO NOT work Error: "When replacing a prefab the source has to be an instance"

Discussion in '5.4 Beta' started by angeliapayne, Jan 15, 2016.

  1. angeliapayne

    angeliapayne

    Joined:
    Jul 13, 2012
    Posts:
    30
    All,

    I recently upgraded to beta 5.3 during the middle of a project in hopes that it would fix an issue that I was having (b/c I otherwise typically do NOT upgrade in the middle of a project). Unfortunately, I seem to have lost the ability to create and use prefabs in my scene. I can create a new prefab in my project however when I try to drag a model into the prefab, I get the following error:

    "When replacing a prefab the source has to be an instance. The prefab you are using as source is a prefab asset."

    I have tried this with C4D, OBJ and 3DS files and it doesn't seem to make a difference. Does anyone know if this will be fixed soon. It seems to be a pretty fundamental operation so I'm hoping it makes the top of the fix list for the next beta release. Currently running 5.4.0b2 and still no luck!

    I appreciate any feedback from anyone here!

    Thanks
    Angie
     
  2. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    You have to drag it in your scene first and then back to your new prefab place.
     
  3. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
    I've filed bug 761995 to track this.
     
    angeliapayne likes this.
  4. angeliapayne

    angeliapayne

    Joined:
    Jul 13, 2012
    Posts:
    30
    I'm not sure what you mean. Drag my model into the scene? My typical workflow is to Create a New Prefab and then drag the model into the prefab placeholder in the Project window. Adding my model to the scene and then dragging it onto the prefab doesn't seem to make a difference...
     
  5. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    842
    Put your prefab together in the scene hierarchy and then drag the gameobject into the folder where you want to have the prefab. Skip the empty prefab entirely. That's how I was doing it for the last years and it works in 5.4, too, so you can work around the bug until it's fixed.
     
  6. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    This issue has been fixed and will come to a patch
     
  7. angeliapayne

    angeliapayne

    Joined:
    Jul 13, 2012
    Posts:
    30
    Thank you so much! If you think of it, post back when the patch is pushed.
     
  8. Shawn-Halwes

    Shawn-Halwes

    Joined:
    Jul 17, 2013
    Posts:
    51
    The issue tracker reports this will be fixed in v5.4.0b2.

    This occurs in 5.3.1p3 and breaks API like PrefabUtility.ReplacePrefab which is a vital part of our tool chain.

    Can this fix be in any of the 5.3 versions or patches?
     
  9. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649
     
  10. SteenLund

    SteenLund

    Unity Technologies

    Joined:
    Jan 20, 2011
    Posts:
    639
    Sustained Engineering team has just confirmed the fix has been back ported to 5.3.2p3
     
  11. angeliapayne

    angeliapayne

    Joined:
    Jul 13, 2012
    Posts:
    30
    This is great news, thank you!
     
    Last edited: Feb 4, 2016
  12. angeliapayne

    angeliapayne

    Joined:
    Jul 13, 2012
    Posts:
    30
    Any idea when this patch will be pushed?
    Thanks
     
  13. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,649