Anyone have any ideas on how to do this? I’d pay $5 for working code if you throw it on the asset store.
EDIT: Multiple component**s** in BULK, rather, changed the title.
Because there’s a lot of fields serialized, it’s not ideal to do this programatically:,
What do you mean? You can right click on a component and pick copy. Then right click and pick paste component or paste component values. You need to right click a components name area in the inspector.
component__s__ Sorry I was unclear – a bulk copy, is the best way to explain this – it seems that you can only copy 1 component at a time. Let’s say I have 10 scripts I want to copy to 10+ prefabs. That’s 100 copy+paste instead of 10.
Because there’s a lot of fields serialized, it’s not ideal to do this programatically.
Dupe the prefab with components and change the other parts. (like the mesh filter, children, etc). Otherwise, I would just write a quick script to do it, you can use: Unity - Scripting API: EditorUtility.CopySerialized for the serialized data.
Though if it is one time deal, it is probably faster just to do it by hand. You can select multiple prefabs and paste the component on all of them at once, so really if you if you have 10 components and you want to paste it on 10 prefabs, it is only 10 copy+paste; if you have 50 prefabs, its still only 10 actions.
What he wants is to copy and paste multiple components from one object to another, not only their values, which is what your awesome plugin does.
Unity only allows for one component to be copied at a time which is an incredible royal pain. I know there are workarounds like those zombiegorilla has suggested, but to me is an astonishing thing the Unity team has not included this as a built in feature.
There was a plugin called Component Copier in the past that did this, but it stopped working in 4.x. I’m pretty sure that if you could make a working plugin for this, or include it in your already great Component Clipboard… well, people around the World would absolutely love you. Me included.
Nice… I have been looking for this as well. I had begun making my own solution to this problem, but wanted to make it possible to just select components in the inspector, but this way works great, and you can even select which properties to copy.
This version is better, the old one with cause build error because it use unity editor function but without check the run time build, run time don’t have editor function.
There’s no context menu when you right click the empty space on a game object inspector, and the Edit menu has nothing helpful to offer. It would be really nice if someone could explain how/where this capacity to “paste” comes from when the editor UI provides no such thing and the people at Unity don’t feel the need to support their own product.