Direct Blueprint Communication
Direct Blueprint Communication is a simple method of communication between Blueprints/Actors. It is used by creating an object reference variable that stores a reference to another Actor/Blueprint. Then, we can call Actions using this object reference variable as the Target input parameter of these Actions.
As an example, let's create a Blueprint called BP_LightSwitch
. The BP_LightSwitch
Blueprint has an object reference variable of the Point Light type that references a Point Light placed in the Level. When the player overlaps the BP_LightSwitch
Blueprint on the Level, it toggles the visibility of the Point Light.
To create the Blueprint, follow these steps:
- Open any existing project that you created that contains starter content or create one if you want.
- Click on the Content Drawer button to open Content Browser, then click the Add button and select Blueprint Class.
- On the next screen, choose Actor as the parent class. ...