Unable to Set Widget Variable when Created in C++
Hello! I'm working on creating a menu with a combination of UMG and C++.
The visuals will be made with UMG Blueprints, but want to reference them in C++ so I can hook up their functionality there.
I first created a C++ class and added a Widget Switcher reference to it. With UPROPERTY, I was able to expose this in Blueprints:
I then created a Blueprint off this class (tried directly creating from C++ class and reparenting when created from UserWidget) and I could see my reference I had created.
I then created a variable in the Blueprints graph called "BP Switcher" and made it instance editable:
With these created, I added a UMG Widget Switcher called "WidgetSwitcher_180". This is listed as an option to reference by my variables, but only the BP-created value can be set. The C++ variable just remains blank when I select the option:
The main reason I cannot use the "meta=(BindWidget)" option is because I am setting this value when it is the child of another widget (see photo below):
Is there some other setting I need to set so I can reference my Blueprint Widget in C++?
Follow this question
Once you sign in you will be able to subscribe for any updates here