Children of Webbrowser blueprint

Hi,

I wanted to know how I could efficiently make children of a blueprint class where only a single variable is different between the children, a url string to be precise.

A parent blueprint handles the distance checks and player interaction, but I want to load the correct url based on which browser the player is nearest (enough) to.

Here is my setup

  • if i make a child blueprint, why doesn’t it show up here under self?

My parent blueprint looks like this

Child blueprints are empty, they only override the url variable.

Am I correct that the entries of the “all actors of class” array is filled with child-blueprints? From these children I can extract the url.

  • Does the 3D widget get duplicated for every child? I’d assume so, it shows up in the child’s components.
  • The webbrowser isn’t connected yet to the “load url” function, I don’t know what connects to it. The context menu suggests nothing.
  • button presses and gamepad input gets disabled when the UI mode is changed. But I can’t override inputs here, what is a good way to exit the page and return to the game?

Thank you for your time.

I have managed to cast the 3d widget to the webbrowser, allthough I believe there is a better, simpler way. This is the blueprint:

For the non-registering key actions I have moved on to a widget button at the top of the canvas.

I guess this is solved for what I asked.
I’ll leave this here if anyone has a similar problem.
And to explain how it works…

  • the input action to interact is pressed
  • the parent blueprint loops over every child blueprint stored in “get all actors of class” array
  • each iteration, there is a distance check between player and child blueprint (the widget is taken here)
  • if a distance is in the event horizon, the loop is broken and the returned entry is distance checked one last time (because the loop always finishes and eventually returns the last entry, even if it isn’t within the event horizon)
  • the child blueprint is casted into it’s webbrowser part
  • the url based on the variables “url” is loaded. This variable is the only difference between each child
  • finally, input mode is changed to UI, the thing is pasted to viewport and the cursor is shown

What you don’t see here is handeled elsewhere, the closing of the widget for example.
It would be in the widget blueprint itself, listening to a button, which then closes every widget.