# How can I use a component within a blueprint inside another blueprint?

**URL:** <https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424>\
**Category:** Editor Scripting\
**Tags:** parent, reference, child-actors, unreal-engine, UE4, Blueprint, question\
**Created:** [January 30, 2019, 10:42pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424 "2019-01-30T22:42:52Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kosar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kosar](https://forums.unrealengine.com/u/Kosar)\
**Post date:** [January 30, 2019, 10:42pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/1 "2019-01-30T22:42:52Z")

</div>

As per the title, lets say I have a camera component in blueprint 1 and I want to use that camera component in blueprint 2. How can I achieve this?

Would greatly appreciate an answer.

---

<div class="post-metadata">

**Author:** ![Crowley\_Caine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crowley\_Caine](https://forums.unrealengine.com/u/Crowley_Caine)\
**Post date:** [January 30, 2019, 11:41pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/2 "2019-01-30T23:41:07Z")

</div>

Quite simply: You add the camera component. If you’re having problems setting it up UE4 lets you copy it between blueprints.

If you mean actually utilize another actors camera you need to make a reference to that component. Just drag it into your event graph, drag out the pin, choose promote to variable and expose it. You can then access it in any blueprint.

---

<div class="post-metadata">

**Author:** ![Kosar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kosar](https://forums.unrealengine.com/u/Kosar)\
**Post date:** [January 31, 2019, 12:05am UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/3 "2019-01-31T00:05:46Z")

</div>

Thanks for the answer, if you dont mind running me through the process as Im new. What would be the next process?

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/9/5b9f0bac9adaf775101247bb68e5d47a61a68bcc.png)

---

<div class="post-metadata">

**Author:** ![Khubur](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/khubur/32/1223964_2.png) [@Khubur](https://forums.unrealengine.com/u/Khubur)\
**Post date:** [January 31, 2019, 12:09am UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/4 "2019-01-31T00:09:55Z")

</div>

Hello, we use communication with actors using of references to get actors property. There are several blueprint communication techniques using of Event Dispatchers, Blueprint Interfaces, Using events and so on.

In this example i will use direct communication using reference variables.

![267088-ue4editor-2019-01-31-02-43-48.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/3/5630f7cb5e6b592964257cbabd00d1fe8ca1667d.png)

In ActorOne blueprint we created a new variable named as ActorTwoReference. Type of variable is ActorTwo Reference and setted public(instance editable).

![267089-ue4editor-2019-01-31-02-44-57.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/4/2d4b0eb71eb63b73c7e530a93e88870217afbf57.png)

In ActorTwo we have camera actor component.

![267090-ue4editor-2019-01-31-02-59-17.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/a/7aacb082abc8af8b4b8080078f114b93a30b0cd4.png)

I put these two of actors into the current level. ActorOne is on left-side and ActorTwo is right-side. By clicking ActorOne in the level, i can set ActorTwoReference refers to the ActorTwo in the level.

 ![267091-2019-01-31-03-05-50.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/c/bac159f2c666d86de0868771e5b8d7ef801e80ef.png)

Now ActorOne has valid reference named as ActorTwo.

I can use ActorTwoReference in my blueprint as calling camera component like this

 ![267092-ue4editor-2019-01-31-03-07-00.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/6/9/869241bd52fe6ffad132799dbbfd78f36c15d567.png)

So I can access camera component of another actor.

---

<div class="post-metadata">

**Author:** ![Crowley\_Caine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crowley\_Caine](https://forums.unrealengine.com/u/Crowley_Caine)\
**Post date:** [January 31, 2019, 12:29am UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/5 "2019-01-31T00:29:56Z")

</div>

I believe he is trying to use a sniper scope visible to another character or something like it.

---

<div class="post-metadata">

**Author:** ![Kosar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kosar](https://forums.unrealengine.com/u/Kosar)\
**Post date:** [January 31, 2019, 1:26am UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/6 "2019-01-31T01:26:36Z")

</div>

Thank you very much for that detailed answer. That clarified what I didnt understand. However, my issue now is that I cant attach that to my new view target value.

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/6/bf65b887a78dfd8a2f334ee0075d93c3c5e55f02.png)

---

<div class="post-metadata">

**Author:** ![Khubur](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/khubur/32/1223964_2.png) [@Khubur](https://forums.unrealengine.com/u/Khubur)\
**Post date:** [January 31, 2019, 2:11am UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/7 "2019-01-31T02:11:41Z")

</div>

Data types of Sniper Camer and New View target is compatible? For checking compliance, drag Sniper Camera pin to New View Target and see the output tooltip.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [January 31, 2019, 5:19am UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/8 "2019-01-31T05:19:06Z")

</div>

Kosar, Just to confirm. You would like to make another camera in another BP the default camera view for example while using a sniper scope.

 ![267127-sniper.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/c/e5c4205cc54685f49adf43527d3fef78ce89298e.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [January 31, 2019, 6:14am UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/9 "2019-01-31T06:14:35Z")

</div>

If it is changing cameras, I posted this answer a little while ago, which also might help.

> **[Can't cast to npc camera.](https://forums.unrealengine.com/questions/864146/cant-cast-to-npc-camera.html)**
>
> I want to make interact. And switch camera to another npc When my character interact with 1 npc, character camera switch to camera of 2 npc. How to make it? I can’t build right nodes. Sorry for strange screenshot. I don’t know what I need for you...

---

<div class="post-metadata">

**Author:** ![Kosar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kosar](https://forums.unrealengine.com/u/Kosar)\
**Post date:** [January 31, 2019, 1:27pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/10 "2019-01-31T13:27:15Z")

</div>

Hi there, I followed what you said and I see the trigger happen but it doesn’t possess the camera still.

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/b/34b9aa41781138c8702a7b2b24856219a2cde157.png)

---

<div class="post-metadata">

**Author:** ![Kosar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kosar](https://forums.unrealengine.com/u/Kosar)\
**Post date:** [January 31, 2019, 1:29pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/11 "2019-01-31T13:29:10Z")

</div>

Just a bit of context. I want Sniper camera to be possessed when the trigger I have set for it to happen. Sniper camera is in a different blueprint which you can see in the Get All Actor of Class.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_776011b61](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_776011b61](https://forums.unrealengine.com/u/anonymous_user_776011b61)\
**Post date:** [January 31, 2019, 10:08pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/12 "2019-01-31T22:08:32Z")

</div>

So your camera is in the BP Projectile? So it follows the bullet to the impact point?

---

<div class="post-metadata">

**Author:** ![Kosar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kosar](https://forums.unrealengine.com/u/Kosar)\
**Post date:** [January 31, 2019, 10:31pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/13 "2019-01-31T22:31:39Z")

</div>

Thats correct

---

<div class="post-metadata">

**Author:** ![Crowley\_Caine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crowley\_Caine](https://forums.unrealengine.com/u/Crowley_Caine)\
**Post date:** [January 31, 2019, 10:38pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/14 "2019-01-31T22:38:35Z")

</div>

If you want to swap to another cam, one way is doing it in your level blueprint via a an event and the node “Set View Target With Blend”, that will allow the camera to transition from your character camera to the actor camera rather than switch right to it. Could add a nice effect to the bullet cam, that it blends over to it. You can also adjust the blend in that node to make it instant.

As for the event triggering it, you want the bullet camera active when the bullet is set to hit the enemy, correct? That could be a bit more tricky, like a line trace or something so you know it will hit, but it CAN technically still miss with movement… unlikely in a singleplayer though.

---

<div class="post-metadata">

**Author:** ![Crowley\_Caine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Crowley\_Caine](https://forums.unrealengine.com/u/Crowley_Caine)\
**Post date:** [January 31, 2019, 10:39pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/15 "2019-01-31T22:39:25Z")

</div>

If you want to swap to another cam, one way is doing it in your level blueprint via an event and the node “Set View Target With Blend”, that will allow the camera to transition from your character camera to the actor camera rather than switch right to it. Could add a nice effect to the bullet cam, that it blends over to it. You can also adjust the blend in that node to make it instant.

As for the event triggering it, you want the bullet camera active when the bullet is set to hit the enemy, correct? That could be a bit more tricky, like a line trace or something so you know it will hit, but it CAN technically still miss with movement… unlikely in a singleplayer though.

---

<div class="post-metadata">

**Author:** ![sweway26](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sweway26](https://forums.unrealengine.com/u/sweway26)\
**Post date:** [September 29, 2023, 1:14pm UTC](https://forums.unrealengine.com/t/how-can-i-use-a-component-within-a-blueprint-inside-another-blueprint/442424/16 "2023-09-29T13:14:07Z")

</div>

Hi there,

Hope you’re doing well.

I am also trying the same thing.  
I have an actor blueprint that has a static mesh that I want to change the material of, when I click a UI button for VR. I have a separate UI widget blueprint that I created. I have the widget actor for this UI button inside the same actor blueprint I have the static mesh inside.

Now I’m trying to connect the UI widget blueprint with the Actor blueprint.  
This image below is what I tried. May I know if this is correct or if there might be a better way to do this. Thanks.

 ![Doubt_blueprints](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/4/4/e441de91aad0ebed7d8e73aa0b7d9f2d955dfda0.jpeg)
