I’ve also got a Blueprint Function Library which wants to access the combobox of the options_main Widget. So I’ve tried to make the connection but got an error. So I stripped down to check if the call to ‘options_main’ was valid, and it seems to be invalid…
Another important thing may be how the flow goes, so here it is.
options_main widget had EventConstruct → Call to custom function in the BlueprintFunctionLib
BlueprintFunctionLib tries to call ‘options_main’ (this is where it goes bad)
I hope someone know’s what I’m doing wrong, thanks in advance.
p.s. another weird thing is, when I compile ‘options_main’ the other Blueprint needs to compile again and vice versa. So I can keep compiling them on and on.
I’m confused as to what you are trying to accomplish here.
Blueprint Function Libraries are just collections of functions for you to be able to call from other blueprints. They do not hold information, they just process it.
What is the goal? What are you trying to accomplish?
I want to fill the combobox from options_main with resolution values from the Blueprint Function Lib (with Rama’s Victory Plugin).
Maybe it’s the wrong approach but I’m used to code in C#/Java, putting everything in seperate classes for readability and easy access.
So from within the options_main widget I’m calling the Fill Combobox with Resolutions function in the Blueprint Lib. And here’s a screenshot of the blueprint function. I think you can read what/how I’m trying to do there
The problem is that you are performing your operations within the blueprint library itself.
Your “Options Main” is a local variable, it only exists in the scope of this function. Due to this reason, your check for it will always return invalid because the object was never created.
If you want to use a blueprint library for the purpose of populating a widget with information, you need to give the widget reference as input to this function. That way, after you call your “Create Widget” method for “Options Menu”, you feed the result to your “Fill combobox with resolutions” function. Give your function a return of widget as well, that way you get the modified widget to add to viewport.
Justin, thank you for your response. I do understand why it doesn’t work now, but I do not really understand how to do what you just told me. Do you maybe have an example? That would be a great help.
I created a small Blueprint Library Function with only one function, it takes in Text and a BlueprintLibraryWidget (what I made above), performs operations on it then returns the updated widget.