Search Unity

replace prefab on stage with other prefab.. not through script

Discussion in 'Animation' started by protoben, Dec 18, 2013.

  1. protoben

    protoben

    Joined:
    Nov 11, 2013
    Posts:
    39
    Let me start with a disclaimer, Im coming at Unity from the Animator/Artist perspective. This question is actually about laying out assets in the scene view but it ties in with a work flow I commonly use in AE so I thought I would ask it here.

    Is there a way to place a prefab in the scene and then replace that instance of that prefab with another prefab. I know I can do this through code, but I am wondering if it is possible just while setting up a scene. For example, I drag a prefab called "tree1" into the scene, slide it around, then realize I should have put "tree2" out there. can I select the currently place tree1 and tell that instance to use a different prefab?

    In AE its select the item in the scene, hold down option and drag the replacement on the original.
    In PS its right click on the object in the layer view and select "Replace Contents".

    is there an equivalent work flow tool in unity?

    thanks
     
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,529
    Nope. Just drag the other tree in and paste in the transform data, or parent it and zero it all out, then unparent it and delete the old tree.
     
  3. Wajdi-azar

    Wajdi-azar

    Joined:
    Jan 21, 2013
    Posts:
    2
    I dont think that there is such a tool, but you can do as follow:

    if the objects you want to switch consists of one mesh you can go to mesh filter and click the small circle then chose from the mesh list the mesh you want to replace.

    other way you can drag your prefab over the object you want to replace and click ctrl to snap to that object in 3d space.

    that all what i can help of :)
     
  4. protoben

    protoben

    Joined:
    Nov 11, 2013
    Posts:
    39
    ok, thanks for the replies. Just getting used to the interface and looking for best practices. Thanks