How do I get data from my level blueprint into a class blueprint?

I have an array of objects I want to pass into my class blueprint so the class can pick one as a location. How do I do this?

Ideally I’d like to call a function in the level blueprint that returns some data to the class.

Use “costume_events” and set an array as input for that. Then you can call this costume event from other blueprint and assign the array to it. For more information about blueprint communication have look to this video.

To clarify yRezaei’s answer - what you want to do in this situation is use a custom event node - right click in an empty blueprint space and type custom, it should pop up. Name it what you want and add an input for the data you want to send.

It may be a little confusing that when you add an ‘input’ it appears to give you an output, but this is because this is what will be called. When you create the other end of this event it will appear as an input.

The next thing you need to do is get the instance of the object you want to call this event on into your graph - you can do this a number of ways, the easiest is to drag a reference to an instance that’s in your scene into the blueprint. Drag a line off that and under the call function subsection you will see your custom event. click it, and pipe through the data you want to send.

16168-capture.png

(you will need to hit the exec input on this node of course…)