Does anyone know why the OnLevelLoaded EventDispatcher / delegate for Level Streaming does not include an Input parameter of what level was actually loaded?
It feels rather unintuitive to me that you would want to know that a level has been loaded, but not be able to know which level was loaded.
This is particularly important when you are loading in several levels and want do something with the Level Streaming object once it has completed loading.
As a side note, the documentation for this dispatcher is unfortunately completely useless and is effectively an empty page.
I have tried some solutions and here is what I found out.
Each level seems to have its own StreamingLevel object. So that’s why there is no level name input on the dispatcher (but it could have be great to avoid to do what I have done …).
Here is my workaround :
I have created an actor blueprint (that I named BP_LevelStreamingEventListener) in which I have encapsulated the level name of which it listen event for. Then I bind the event (on level shown and on level hidden) to custom events and I created two dispatcher that give the level name in input (so that fix our issue).
Here is the BP_LevelStreamingEventListener EventGraph :
Then I use this Blueprint to bind with each StreamingLevel object. For that I have a function that give me the level name of all the levels available in my project. Here is its implementation :