{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbaba-s.hatenablog.com%2Fentry%2F2020%2F09%2F18%2F233000\" title=\"\u3010Unity\u3011Paste Component As New \u3092\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u547c\u3073\u51fa\u3059\u65b9\u6cd5 - \u30b3\u30ac\u30cd\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","width":"100%","author_name":"baba_s","title":"\u3010Unity\u3011Paste Component As New \u3092\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3089\u547c\u3073\u51fa\u3059\u65b9\u6cd5","description":"\u6982\u8981 using UnityEditor; using UnityEditorInternal; public static class Example { [MenuItem( \"Tools/Hoge\" )] private static void Hoge() { var gameObject = Selection.activeGameObject; ComponentUtility.PasteComponentAsNew( gameObject ); } } ComponentUtility.PasteComponentAsNew \u3092\u4f7f\u7528\u3059\u308b","image_url":"https://cdn.user.blog.st-hatena.com/default_entry_og_image/94867065/1535279515352365","url":"https://baba-s.hatenablog.com/entry/2020/09/18/233000","blog_title":"\u30b3\u30ac\u30cd\u30d6\u30ed\u30b0","type":"rich","author_url":"https://blog.hatena.ne.jp/baba_s/","categories":["Unity","Unity - \u30a8\u30c7\u30a3\u30bf\u62e1\u5f35"],"version":"1.0","blog_url":"https://baba-s.hatenablog.com/","height":"190","provider_name":"Hatena Blog","published":"2020-09-18 23:30:00"}