Best way to send variables from level blueprint to class blueprint

Hi,

I implemented a time-of-day system, and I want some class blueprints to update themselves using the current time of day.

The system is in my level blueprint, and I want in my class blueprint to access the pitch of my Directional Light Source.

How can I do that?
How should I send variables from the level blueprint to my class blueprint?

Also this variable is updated every ticks, so I don’t think using an event is very efficient.

Thanks

If your classes are already placed upon begin play, you could fetch all of them on Begin Play with Get All Actors of Class. Then you could store the array and use a loop to update each actor on every tick. Either by calling a function from your class or using an Interface to send a message to each actor.

If you use an interface, you can send a generalized “Update Time” message, which you create, with the current time to any object of your liking.

I bet there is a more efficient way of doing it than this. Coming from other programming languages, it’s not uncommon to have a shared time object, maybe with a pointer, but I don’t know if that’s possible with blueprint.