Quantcast
Channel: Answers for "Editor Wizard: Copy Existing Components to Another GameObject"
Viewing all articles
Browse latest Browse all 8

Answer by Eran-Yaacobi

$
0
0
A better approach would be to use UnityEditorInternal namespace: UnityEditorInternal.ComponentUtility.CopyComponent(componentToCopy); UnityEditorInternal.ComponentUtility.PasteComponentAsNew(targetGameObject); You can also use PasteComponentValues instead of PasteComponentAsNew.

Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>