Changing an image in a blueprint while in runtime.

That’s not the variable list - check my screenshot again:

This part. I said “the details panel” but I meant “my blueprint” - my bad.


Sorry you were asking about the details panel of the blueprint which got me confused, heres the variable list

Do you get any errors if you disconnect this:

image

Yes they all go to the inventory UI

Where does it take you, precisely, when you follow the error?

No i dont get any errors, i can compile it and pickup the sword fine without it showing errors, however it does not enable the sword.

They take me to the set members in slate brush nodes.

1 Like

Some shots in the dark because I am running out of ideas:

  • this whole inventory widget is not inheriting from another widget? (if you do not know what I’m talking about, it’s fine)
  • is Sword_button a regular native button, like the one you find here:

Its not inheriting from anywhere, can confirm it inherits from this blueprint

Yes the button is a native button, I havent downloaded any additional plugins for this project appart from 3d models and animations

Edit: Just tried replacing the button with a new one, same problem. Im thinking the slate brush doesnt like it

1 Like

vs

You might be onto something. Let me replicate it. Perhaps instead of throwing warnings (as it used to), it now throws proper errors.

1 Like

Quick warning: I am on 5.4.4, so maybe its different :confused:

Edit: also it did work at first! the only thing that happened in-between that and the new error was zipping the file to upload it to onedrive.

also it did work at first!

Annoyingly enough this works fine on my end, after restarting, too:

Was hoping to discover UMG doing yet another thing I don’t understand :innocent:


The error definitely complains about the button reference being null. There’s no chance you remove this button and replace it with another, is there? Because that’s the only thing that comes to mind.

  • if you do not mind, could you try to replicate the above in UE 5.4.4 - providing the scenario reflects what you’re trying to achieve.
  • also, consider finding all refs to this widget:

You’ll get a list, double click each entry - it will take you to all BPs that try to access it. Perhaps you’ll find something uncanny.


The only refs to the button are in this blueprint sadly, I did remove the button and replace it and nothing changed.

When i recreated what you did it worked! no idea why but it did. the only thing i had to change though was the event.

Edit: It does work if the widget is on the viewport when i pick up the item, however it does not when its removed from it

THIS WORKS
I have no idea why this works while the custom event didnt but it works now XD

Tick runs every frame, so that’s the absolutely worst way to handle it. You’ll be updating this 120 times per second, non stop - for the rest of the game. So you’ll make about a million completely redundant updates after 2 hours of gameplay :innocent:


My suggestion is to look into that custom event. There’s clearly something very funky going on with it. Perhaps you call when the widget is not in the viewport and the brush spasms out. Tick does not run when the widget is not showing, so that would hide the errors.

Essentially, what you’ve demonstrated should not occur under regular circumstances. Considering figuring out what is irregular here. You’re doing something behind the scenes we don’t know about.


Here is the custom event details, Im also very confused.

Also to explain the UI reference earlier: I managed to set the default value of the reference to the widget using a reference that isn’t called until the player open the inventory, not sure if that would break anything though. This is also why i cant use validated get, because the default value is always true.

Not sure I follow - what reference are you talking about? Sword button? You do not need to set a reference to the button, it’s done automatically as soon as you flag as isVariable.

I managed to set the default value of the reference

This part is the most worrying, there should never be any need to do this.

You said it works when you use another event - like button onClick. Think what other things can be going on behind the scenes. When / how / where are you calling that event.

You were asking yesterday about the reference variable to the inventory widget, just trying to give some context, Also lesson learned, removing default value now.

I wonder what you’re really doing - because this is impossible to do under regular circumstances. In order to remove a default (which is set automatically by DEFAULT), you’d need to nullify the var and orphan the widget - that would cause the errors you see. Don’t do any of that.

If this is the button:

Do not assign anything here.


I’ll tell you one thing. I doubt anyone has ever seen an issue like this. I wonder if you added a variable manually at first, and then flagged the actual widget as variable and the names got mixed up…

1 Like

For a quick overview of what im trying to do: Make a widget that updates with equipment that the player has picked up that they can then equip and use.

I also have no idea what i did to the variables, probably what you said. I’ll just replace them quickly to avoid any future problems

Quick question: Do i need to create widget in order to update the blueprint elements and varibles, if not what can i use instead of creating the widget for the reference.

Edit: nevermind, fixed the issue

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