Hi all, just wondering if there’s a way to update the image component on a widget while in runtime, I’ve looked all over and the image linked is what ive ended up with. At this point im considering just skipping this stage but I wanted to see if theres a way to make this work
Hi there thanks for responding, I tried doing a quick version of your first image and this is what happened
However it appears I meant a buttons brush image
(New users apparently cant upload more than one image so image an image of it working)
Thanks so much for the help, Your a true Community Hero
To clarify where i went wrong for anyone else: I was setting the variable of the brush instead of the brush itself, so use ‘set members in slatebrush’ in yours.
- avoid placing orphaned node. Drag a wire first, then search.
- a Sword is a button, you’re trying to connect it to a Border (see the text on the node
Target is Border
) - if you want to do it with a Button, use the 2nd example I posted. The top one is for an
Image
, while Sword is aButton
Looks good!
Colour me mildly surprised that the editor no longer complains about styles being read-only. Are you on UE v5.5?
Im currently on 5.4.4, Currently doing a college project and everyone has to use the same version to avoid unfairness.
I reopened it today and its complaining Tried to fix it by setting a variable to the style but that didnt work.
It’s complaining about this. It’s no longer valid - something has happened to the reference. It was removed, replaced or renamed (the latter is unlikely).
Looked into this a bit more, found that the sword button doesnt have a default value nor can i set one to it, any advice?
Flag the widget button as isVariable
in its details panel and use that reference. Non need to create additional reference variables.
Did that, still doesn’t want to work.
I will also say this only happens if i haven’t opened the inventory at least once, not sure why since I create the widget on both opening the inventory and picking up the item and having a bool stop it from doing it twice
Why would you create it twice? Wouldn’t that mean you have 2 (or more!) inventory widgets… Considering looking into how many widgets get created and how you keep track of the references.
As i said in the message i have a Boolean that gets toggled when the widget is created that doesn’t let more than 1 widget exist
A reference to a button does not just nullify itself. There’s something going on we don’t know about. Do you, perhaps, remove that button? Also, there’s no need for additional boolean in this case - you can right click a ref var and convert it into the Validated variant.
edit:
The above makes no sense, for example - you create a widget but do not do anything with it. So now you could end up in a situation where you have 2 inventories (one orphaned). Admittedly this one will be Garbage Collected soon. It does not do anything.
It’s impossible to follow the logic without seeing the whole thing.
Did not remove or replace the variable it should be connecting properly.
I also made the ref variable set to the inventory by default, I may change that since you pointed that out
there shouldnt be 2 inventories, this is because I set it so after the widget is made it sets the inventory made boolean to true, and i dont add a create widget on the true path, also the inventory made boolean is in the player bp, allowing me to set the inventory made boolean from both blueprints
Edit: if you want to see the whole thing I’m free in about 2-3 hours. do you have anywhere i can contact you?
- Could you show the details panel of the blueprint where this variable is:
The variable list, as in:
Which BP is this, a widget that has the sword button?
- Do all those errors point to the very same location, the same BP?
If you keep clicking the underlined part? Which BP complains about it?