From my level blueprint I’am calling event dispatcher ‘Sunrise’. Now in my Streetlight blueprint i want to bind to that event dispatcher and turn it off. How to do it?
Hey Buyaka,
Unfortunately, it seems that trying to reference something within the level blueprint will not work as intended. However, if you create this event dispatcher within a regular blueprint, you’ll be able to cast it to the level blueprint if needed, or to any other blueprint for that matter.
Here is some documentation that may be of assistance:
Have a great day!
Unfortunately, it seems that trying to
reference something within the level
blueprint will not work as intended.
This is bug right?
if you create this event dispatcher
within a regular blueprint, you’ll be
able to cast it to the level blueprint
if needed
Hmmm strange. Is casting a regular blueprint to level blueprint a valid operation? I think casting is only valid if one type is parent of the other. Can You please post an example of such cast?
Hey Buyaka,
Right now, you simply cannot reference a specific level blueprint to call a dispatcher on. Generally, these types of dispatchers may be more accessible when they’re in the level’s GameMode blueprint.
We’re definitely working on a way to call into a streaming level blueprint via an interface. Once that’s implemented, you’d be able to use this to trigger level dispatchers. However, there is no estimated time frame on that release.
Please watch this tutorial to learn more about Event Dispatchers. I would also suggest that you watch these tutorials as well as our library of video tutorials. You’ll find almost anything that you need to through these links, and of course our forums too.
I hope this helps you further. If you have any further questions, please let us know. Have a wonderful day!
Hi Samantha,
soo basicly I can define dispatcher in level blueprint, I can call it, but there is no way to reference Level BP and bind to it.This seriousely limits usefulness of LVL BP.
Anyway, thanks for Your time and help
Hello,
You’re very welcome. The developers are working on a way to call these event dispatchers into level streaming, it’s just not possible at this time.
Have a wonderful weekend!
Am I understanding this correctly? UMG buttons cannot dispatch events to Level Blueprint? My brain just had a partial meltdown. I’ve been banging on this for so long, watching one tutorial after another (all very long ), not to mention have built a very complicated save game system in my Level Blueprint that is somewhat dependent on talking to the UMG.
maybe i’m not understanding this right? I haven’t seen one tutorial that says, “Yeah don’t try to make the UMG talk to the Level Blueprint you will just waste hundreds if not thousands of hours doing that”.
so i’m probably misunderstanding this. yes?
No, because a game can have multiple levels and your buttons would then only work in a specific level.
What you need is a common object that is both accessible by the level blueprint and your UMG buttons. The level blueprint “binds” events to this object’s dispatchers and the buttons “call” them. This way your buttons will work independently of the level and you can also have other objects listen to the dispatchers and react to the buttons, for example.
A good place is the GameInstance class. This is configured in your project’s settings. Just create a blueprint or C++ class derived from GameInstance and set it as your project’s Game Instance. Then you can add your event dispatchers to your game instance class and bind/call them from anywhere in your game.
why is the gaminstance recommended?..its has no ticks or beginplay.
because game instance can store all info between different levels, do not use tick call timers.