Is there a way to add the same script from the library to multiple objects in the editor at once?
I'm not talking about prefabs, these won't suit my needs.
asked Mar 28 '11 at 01:48 PM
To add script YourScript to a bunch of objects:
Select all the game objects you want to apply the script to
Lemme know it that works for you. Worked for me.
answered Apr 10 '11 at 04:34 AM
I am afraid you would need to make your own editor script for that. Perhaps check all gameObjects in the current Selection and apply some type to those. You'd probably have to use reflection (advanced) to list all the available component types as well. Perhaps you could start off with ReplaceSelection wizard and edit it to instead add a component? To make it easy you could just use a string when adding components instead of toying with reflection.
answered Mar 28 '11 at 01:57 PM