WebBrowser widget OnConstruct event missing

I am trying to make opening a WebBrowser widget as optional so that it checks some properties in the UMyPlatformGameInstance, and depending on their state, either exits immediately or opens up.

Now I assume I need to catch some “OnConstruct” event in my WebBrowser widget, and then ask the parameters from the UMyPlatformGameInstance, and then exit/launch as appropriate.

Problem is that there is no OnConstruct event available in the WebBrowser widget. Well, there are these “cosmetic Construct events”, and “should not be used in gameplay”. And they do not seem to be triggered in the construct as one might expect. So what to do?

So how to do this?

There’s no point to create a widget if you plan on removing it right away.

Rather than creating the widget with a condition in its construct script that checks for a variable state in the gameinstance, you should simply have logic that only adds that browser widget to the screen in case that variable state is satisfied.

You are probably right, thanks for that. I am just leaning my way around the UE.