Combobox string issue

I am trying to make a combobox dropdown element which would change the mesh attached to an actor ( it is currently just a cube for testing purpose) however I cant seem to get it to work. Selecting any option in the list does not do anything to the actor. Also, on exiting the the session I get the following error

Following is how I am arranged the blueprints functionality for UI and the Actor

Any pointers would be helpful … !

The error says the ButtonMenu object is empty (an empty variable?)

also when your combobox seleciton changes you are calling a function inside your pawn and trying to get some button value from there? that is strange…

I am fairly new to Unreal and still learning things and implemented these graphs in what I thought should be the proper way… :sweat_smile:

I am open to suggestions on how it can be implemented differently…

I would like to expand what I am exactly trying to achieve as I think I was not very clear in first post. Basically I am trying to implement an element where you can click on an object ( a simple cube in this case ) then attach an object selected from the combobox UI element on top of the cube.

This is the details of ButtonMenu ( a variable referencing the UI widget which has the combobox in it )

bp_button_var

the problems after line 1 in this case are all likely caused from the first line

accessed none trying to read ButtonMenu

you can copy the Button Menu and pass it along to the second screenshot by making it into a function or implementing a blueprint interface

Not an exact answer to your question more of a direction for you to go to understand what you’ve done wrong… the problem here is from the CastTo node, it can’t access the hud in this way so when you get to your CustomEvent there it has no idea what ButtonMenu or ComboString are
i may slightly mis understand what you’ve got going on here if there’s something out of the picture happening but it appears you’ve copied the ButtonMenu and ComboString node after placing it in the Widget Bp

With functions:
not advised but somewhat simpler


With Interface:




Your implementation of this will surely be a bit different, but if you re create this it should give you a decent idea of how Interfaces work and what a CastTo is looking for when it says Object ( hint its an object of that type that you need a ref to… either from an overlap or get player character etc )

Hope this helps ya… at the very least the interface method will give you a way to do it, the “Target” that it asks for is just something that implements the interface

Using the above and this video, you should be able to wrap your head around interfaces and whats going on with passing variables between BPs
Check out this video on Interfaces

1 Like

And welcome to the Community btw… you’ve come to the right place… if your literally just starting here’s some stuff that may help in your learning journey

Useful depth sometimes but at least for me never a complete picture
Ryan Laley

Useful ways to quickly do stuff but not always the best way to do it
Gorka Games

Another similar to GorkaGames…
Matt Aspland

Really solid source on things to avoid doing with full explanations of why
Definitely check out this one out if you ignore all others: LeafBranchGames

Lighting type stuff
Love this guy, he’s actually partly deaf and makes the best lighting tutorials with reasonable explanations that I’ve ever seen William Faucher

I could literally paste my entire bookmarks of tutorials that i’ve gone through here but this should get you some solid channels if for some reason you can’t find the Decent or Amazing sources of knowlege

1 Like

Thank u very much :smiley: Got working as intended through use of blueprint interfaces.

On the UI Widget BP Graph

On the actor BP Graph

Hello All … Just a small thing that I needed to ask. I have understood fairly enough about blueprint interfaces, however I am stuck a bit here.

I am using BP Interface to send a message from my player to the UI widget I have made ( Just changes the visibility of text ). However I am stuck on what should be inputted in the TARGET node of message. I understand that “target” is UI Widget, but their is no corresponding node that I seem to get which would be used here.

Any inputs would be helpful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.