Problem
In my level, I need to spawn multiple information screens. And each time after showing the ui, it has to do something different each time.
Currently I am duplicating the widget blueprint and calling separate functions from each of these widgets. I have to spawn a lot of these screens and duplicating seems to be a bad idea.
But if I have to use a single widget where text is assigned on runtime, how can I make it do different things each time it’s called from a 'menu spanner blueprint? If I add an interface and call the function on menu spawner itself, how can I differentiate each calls?
Eg.
Call 1.
Assign text & print.
Change value A in game mode.
Call 2
Assign text b and print
Change value B in game mode.
Change level.
Stupid ideas.
Increment an integer each time the function is called in ’ menu spawner’ and use a switch?
But what if I have to do it 100s of times?
What is the best approach?