Direct Blueprint Communication

A demonstration of passing information directly from one Blueprint to another.


This page covers using Direct Blueprint Communication to communicate between two Blueprints and pass information between them.

For this example we will allow the player to pass through a box and communicate with and activate a particle effect.

For this guide we are using the Blueprint Third Person template with Starter Content enabled.

  1. In the Content Browser, open the Content/StarterContent/Shapes folder.

  2. Right-click on the Shape_Cube, then under Asset Actions, choose Create Blueprint Using This...


    Click Ok at the confirmation box that appears to create the Blueprint.

  3. Inside the Shape_Cube Blueprint, select the Static Mesh in the Components window in the upper-left.

  4. In the Details panel, change the Collision Presets to OverlapOnlyPawn.


    This will ensure that only the Pawns and by extension Characters can pass through the box.

  5. In the MyBlueprint window, click the Add Variable button and name the variable TargetBlueprint.


    This will be the other Blueprint that we want to directly communicate with.

  6. In the Details panel for the variable, set Variable Type to Blueprint_Effect_Fire and make it Editable.


    Here we set the Blueprint that we want to communicate with and made the variable publicly editable (editable outside this Blueprint).

  7. Select the Static Mesh in the My Blueprint window, then in the Details panel, add an On Component Begin Overlap Event.


    This will add a node and open the Event Graph where we can provide the script that occurs when entering the cube.

  8. Drag off the Target Blueprint and Get P Fire and Get Fire Audio, then connect as shown to an Activate node.


    Here we are accessing the Particle Effect and Audio components inside our Target Blueprint and Activating them.

  9. In the Content Browser under Blueprints, drag the Shape_Cube Blueprint into the level.


  10. In the Content Browser under Content/StarterContent/Blueprints, open the Blueprint_Effect_Fire Blueprint.

  11. In the Components window, select P_Fire then in the Details panel un-check Auto Activate.


    We do not want this effect to auto activate as we will tell it to activate when entering the box in our level.

  12. Drag the Blueprint_Effect_Fire Blueprint into the level.

  13. Select the Shape_Cube Blueprint then in the Details panel, use the drop-down to select the Blueprint_Effect_Fire Blueprint.


    Here we are specifying the instance of the Blueprint_Effect_Fire Blueprint in the level that we want to communicate with. If we have placed several instances of the Blueprint_Effect_Fire Blueprint in the level, each of the instances would be displayed inside the drop-down menu allowing us to indicate which instance is the Target Blueprint to communicate with.

    Clicking the Eye Dropper icon allows you to select the instance of your Target Bluperint inside the level instead of using the drop-down menu. Remember, you can only select Blueprints to target based on the variable type you have specified.

  14. Click the Play button to play in the editor and test running through the box with the character.

You will see that once the character enters the box, the fire effect will be activated inside the level. You can use Direct Blueprint Communication to not only change the properties of a Blueprint from inside another Blueprint, but you can also pass the values of Variables, call Functions or Events, or anything else that the Blueprint would otherwise normally be able to do.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey