1
\$\begingroup\$

So... I have a tree object and I have duplicated it to have many trees in the scene. So, I have about 200 trees in the scene. Before duplicating I forgot to add a tree as a prefab. Now, is there anyway to add a tree as prefab and make the other trees behave similarly.

Any Help would be appreciated. Thanks in Advance!!

\$\endgroup\$
2
  • \$\begingroup\$ This is the best that I could find. I tested it but it seems to completely replace the old object like the position, so I'm not sure if it's helpful. \$\endgroup\$
    – Daniel
    Sep 27, 2015 at 7:42
  • \$\begingroup\$ I think the only way to edit all of them is to select them all and make change in the Inspector which will be applied to all of them. It works fine with changing values and adding components I believe. \$\endgroup\$
    – John Smith
    Sep 27, 2015 at 12:49

1 Answer 1

0
\$\begingroup\$

Someone created a script for that: you can found it here on GitHub.

I report it here for completeness:

 @MenuItem ("Tools/Revert to Prefab %r")
 static function Revert() {
     var selection = Selection.gameObjects;

     if (selection.length > 0) {
         for (var i : int = 0; i < selection.length; i++) {
             EditorUtility.ResetGameObjectToPrefabState(selection[i]);
         }
     } else {
         Debug.Log("Cannot revert to prefab - nothing selected");
     }
 }

I have never used that, but I hope that you can find it useful.

\$\endgroup\$
2
  • \$\begingroup\$ Thank You for that. I actually already set up components for them individually. :P \$\endgroup\$
    – Anonymous
    Oct 1, 2015 at 9:18
  • \$\begingroup\$ OK! I hope that, keeping it here, it could also help others! ;) \$\endgroup\$
    – Andrea
    Oct 1, 2015 at 9:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .