Help! Duplicated Many Things without making Prefab!

Hey guys…i forgot making prefab before duplicating an object to 200 X gameobjects with different positions…

How can make a single prefab from All duplicated things?
(Dragging into Project while multiple select doest work)

I know i can make edit things equally while multiselected in hierarchy …but is there a way?

No, there is no simple way to fix this. Well, not without writing some fairly fancy IDE scripts (or perhaps finding some off-the-shelf script for this, though I don’t know of any off the top of my head).

I think you need to delete 199 of those gameobjects, create a prefab, and then rebuild your scene using the prefab.

Also, consider whether you really want all those prefab instances in your scene at edit time, or whether it’d be easier to instantiate them at runtime, with a bit of code in Awake or Start. Just a thought.

2 Likes

You could certainly write an editor script to do this. Basic strategy:

  • Put all of the objects into a list
  • Store the positions and rotation in a second list
  • Delete all of the objects
  • Create new objects from a prefab
  • Assign each new object a position and rotation from the list previously stored

If you are familiar with editor scripting, you could probably whip that up in a shorter time then it will take to reposition the objects manually.

2 Likes

Or bite the bullet and make a prefab from one of your objects, delete, and start over. We all have done stuff like this. Sometimes it’s painful, and sometime it’s real painful. Try to learn from this as it’s the only positive thing that can come from screw-ups. We all seem to do these things once in a while, an unavoidable down side of being human.

1 Like