x


Reverting to prefab-state several game objects at once with stock Unity

Hey guys, I need to revert several similar objects to their prefab at once but when I select said objects I can only revert last selected.

This issue seems to be a part of a pervasive problem with Unity whereby if several objects are selected you cannot make changes to all of them(Say remove a component that they all share).

Any ideas would be greatly appreciated, since this issue has bugged me ever since I started working with Unity.

Thanks!

more ▼

asked Aug 24 '11 at 03:10 PM

UdevMike gravatar image

UdevMike
46 8 9 10

(comments are locked)
10|3000 characters needed characters left

3 answers: sort voted first

Here is a solution: http://answers.unity3d.com/questions/144453/reverting-several-gameobjects-to-prefab-settings-a.html

Old question, but it's high up on Google, so I'm linking to the solution.

more ▼

answered Dec 28 '11 at 12:27 PM

Stardog gravatar image

Stardog
224 21 29 36

(comments are locked)
10|3000 characters needed characters left

Since you seem to be talking about editor mode strictly, the only simple way in which you can achieve something similar is by creating a different prefab for each 'class' of your gameobjects in the scene, and then alter the PREFAB attributes for each group, rather than the scene objects.

I don't think there's many occasions in which this could be an issue though. You usually don't need to revert scene objects to prefab, unless you're experimenting with the editor, possibly. As a matter of fact, in this case you could be better off actually going for editor scripting.

more ▼

answered Aug 24 '11 at 03:24 PM

roamcel gravatar image

roamcel
1.2k 37 40 44

That's quite true, and while I try to keep myself from editing a prefab-connected-object so as not to break the connection at times it either happens by accident or due to a crash.

But it is a bit counter-intuitive and dreary since I need to create a prefab for each lamp as an example.

Aug 24 '11 at 03:51 PM UdevMike
(comments are locked)
10|3000 characters needed characters left

Give this a try: http://www.unifycommunity.com/wiki/index.php?title=ReplaceSelection I think it will do what you need.

more ▼

answered Aug 24 '11 at 03:31 PM

DaveA gravatar image

DaveA
26.5k 151 171 256

Thanks Dave, I'll give it a try!

Aug 24 '11 at 05:31 PM UdevMike
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2087
x1257
x292
x90
x13

asked: Aug 24 '11 at 03:10 PM

Seen: 1254 times

Last Updated: Dec 28 '11 at 12:27 PM