Variable from Class to Level Blueprints

In my Level blueprint script, I’m trying to read a variable from an instance of a class. I have an Event Dispatcher which I can use in my Level script, but it only triggers when the event takes place. It doesn’t pass variables. How can I do this?

If that does make sense, this might be more specific:

I have a blueprint class that includes a light and some other actors. It also has a variable that is public. When I place instances of this blueprint in my level, I set the public variable.

All kinds of things happen within the class when a collision takes place, but I would like the level blueprint to read the variable from the instance which was in the collision and do more things with that data.



You need to get a reference to the blueprint instance. Click on the instance of the blueprint that is placed in the level. Go to the level blueprint. Right click on an empty area in your level blueprint event graph. The third option should be “Create a reference to (insert blueprint instance name)”. Now you should be able to get the variable from your blueprint instance reference.

Thanks. This helped me solve my problem.