Gameinstance variable for loading screen

Hi,
following this tutorial, I created a loading screen for my game. However, as one comment mentions, this is only a fake loading screen, which is not bound to the actual loading time. A nice person (TheMrgrr) was so kind to provide a solution for that, however I haven’t been able to implement what he says. Could someone show me, what he means?

Solved it by myself, question can be closed.

Could you explain? I saw the comment and I am struggling to make a loading screen.

Sure, it’s actually quite simple:
I’m assuming, you want to load from a level into another. Create a widget blueprint and customize the look, in my example I just added a text block, that says ‘Loading…’

http://puu.sh/iZTIr/41341bf554.png

Now, in your GameInstance create two new variables, I called them Loading (boolean), set it to false by default and LevelSelected (Name) and make them editable.
In your widget blueprint add this blueprint logic:

http://puu.sh/iZTPW/3453a78340.jpg

In my case, I’m calling the loading screen, when a button in a menu is pressed, so here is the blueprint logic for that button:

http://puu.sh/iZU6w/54d081fb3b.jpg

Finally, add this logic to the level you want to load into:

http://puu.sh/iZUe1/0a535cee81.jpg

That should be about it! Note, that i did this with Unreal Engine 4.7.6 and this is probably a naive approach, but for my purposes, it’s working fine. If you have further questions, let me know!

Thanks a bunch it works :slight_smile: