Is there an event in UE being fired when the loading from a level ends. All demo’s I have found so far use a fixed time to display a splash screen.
The problem is that I have a large level and on slower computers the loading does take up to 1-2 minutes, but on faster computers it is a matter of 10 secs or so.
If such an event exists, I can use it to trigger the unloading of my splash screen and such a system would be fine on all computers (slow or fast).
Hello mate, you can create your splash screen in a user widget (maybe it has a fade out animation?), then in your level blueprint from the EVENT BEGIN PLAY Node, create widget that you made with your splash screen and add it to viewport, then from the blue output node of create widget drag out and create a play animation node. from the same blue node drag out and you should be able to type in 'get (animation Name) and drag this into the play animation node you create just before. (For cleanliness Id set a delay after this for however long the animation is (Plus maybe half a second or so), then remove the splash screen widget from parent, which you can do by using the same blue node from the create widget node) Sorry for quick reply hope this helps
I have seen similar things in some demo’s online like for instance from virtus education, but that is not what I meant.
I will not play an animation for 2 minutes (every time someone opens my game - maybe the first time), if 15 secs is enough. I prefer to have a “static” splash screen, so the loading can go faster.
What I’m looking for is an event generated by UE when a level is loaded. At that moment I can generate my own code to handle the unloading of the splash screen. If the loading only takes 12 secs, I can unload the splash screen after 12 secs, if it takes 2 minutes, I can unload it after 2 minutes. There must be something in there, but I have not found anything so far …
Hmm Sorry mate, usually for like splash screens I create a widget at whatever point the level ends and play a fade out animation, then load level (Which basically crashes the game and therefore keeps the splash screen on but frozen), then as soon as the new level loads do the steps above. This kind of creates a seamless transition between levels. I dont know any C++ myself though
What about using the tick event? That would leave the splash screen up for one frame over top of the game, but will seem instant when you are playing it.
Use a “DoOnce” node off of tick and set it to remove the splash screen (in your level blueprint). That should work.
There is another event I have not tested yet called “OnOpening” that might be useful, but I’m not sure when it gets called so you would need to look into it some more.
So, the “thick event” only starts when the game is actually on the screen, that is what you mean ? If so, that should do the trick just fine ! Will test this out.
If, for some reason, it might not be the solution I’m looking for, I will have a dive into the “OnOpening” event.
Thanks for sharing this Orkney. I will give it a try if no other options are available. As a programmer myself, I rather would not try crashing things to get them working - but, if it turns out the only way, I will for sure look into it !
Yes, tick only fires once the game is fully loaded and starts running. It fires every frame so you need to make sure you aren’t running the remove every time it fires (wasted performance), but a DoOnce node will only allow it to process that code once on the first frame.
There is a setting in blueprints under the Actor Tick section to make it fire before begin play if you want, but by default tick only starts once you are “in-game”.