# Add Instanceの代わりに、BPを配置する

**URL:** <https://forums.unrealengine.com/t/add-instance-bp/453937>\
**Category:** Blueprint\
**Tags:** child-actors, add-component, unreal-engine, construction-script, question, Blueprint\
**Created:** [August 16, 2019, 4:47am UTC](https://forums.unrealengine.com/t/add-instance-bp/453937 "2019-08-16T04:47:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tutuhu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tutuhu](https://forums.unrealengine.com/u/tutuhu)\
**Post date:** [August 16, 2019, 4:47am UTC](https://forums.unrealengine.com/t/add-instance-bp/453937/1 "2019-08-16T04:47:37Z")

</div>

「Construction Script」内で①画像のような形のノードを組んで、  
最後に「Add Instance」でコンポーネントに設定した「InstancedStaticMesh」を配置しています。

 ![285137-file.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/c/67cf1678574f52f61ed129f05d190b8632337257.png)

このノードの最後に設置している「「InstancedStaticMesh」」をBPで自作したActorに置き換える方法はないでしょうか。

調べてみると、「Add Child Actor Component」を使用することで、「Construction Script」内にもアクターを生成できるとのことでしたので、

自作のBP「BrokenBlock」を子コンポーネントとして作成し、「Add Child Actor Component」を使用して繋ぎ直してみましたが、

上手く生成することができませんでした。（画像②）

 ![285138-file.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/d/ffd032d19a9d86812d4304fc56bdc5bfa90f7411.png)

お手数をおかけしますが、ご存知の方がおられましたら、  
ご返答のほど宜しくお願い致します。

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_284f2629](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_284f2629](https://forums.unrealengine.com/u/anonymous_user_284f2629)\
**Post date:** [September 5, 2019, 8:18pm UTC](https://forums.unrealengine.com/t/add-instance-bp/453937/2 "2019-09-05T20:18:41Z")

</div>

試されている内容的に以下URLのやりとりは既に確認されているかもしれませんが、  
現在うまく行っていない点としては、追加したMeshがビュー上に表示されていないということでしょうか？  
スクリーンショットをパット見た感じだと問題なさそうにも見えます（プロジェクトをみていないのではっきりとは言えませんが）  
コンパイル自体は通っているようですので実際に配置されたときにエラー等がでていないか一度確認していただくとよいかと思います。

UE4 ConstructionScript内でSpawn出来ないのをComponentの追加でプロシージャルする方法 #UE4Study - Togetter [UE4 ConstructionScript内でSpawn出来ないのをComponentの追加でプロシージャルする方法 #UE4Study - Togetter](https://togetter.com/li/868931)

---

<div class="post-metadata">

**Author:** ![tutuhu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tutuhu](https://forums.unrealengine.com/u/tutuhu)\
**Post date:** [September 8, 2019, 6:38am UTC](https://forums.unrealengine.com/t/add-instance-bp/453937/3 "2019-09-08T06:38:33Z")

</div>

ご回答ありとうございます。  
指摘頂いたURLは確認してテストしていたつもりでしたが、  
どうやら「Attach to Componet」ノードの種類が、私のものは「ターゲットはActor」になっており、  
正しくは「Scene Component（にターゲットを変数で指定したもの）」のノードを使用する必要があったようです。  
こちらのノードに変更したところ、「Construction Script」内で自作のBPオブジェクトを生成することができました。

機能していることを確認したスクショになります。↓

 ![286730-スクショ.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/5/3/353027b93949d50e3776ef50bad1e8c28e6c6188.png)

お手数かけて申し訳ありませんが、こちらで解決とさせて頂ければと思います。
