Change Widget Image based on BP instances

Hello there, I have a blueprint that spawns items with different rarities, and I want my widget to change its image texture based on the item’s rarity.

here’s the “common” image widget for example

and here’s my code:

the issue is that the widget image changes every time a new item spawns and applies that change to all other items.
for example, if a rare item spawns, all the actors will apply the rare image to them until another item spawns.
I want each item to save the correlated image to them.

You need to spawn an actor, then create a widget for it and pass a reference to the actor to your widget.
Instead of GetActorOfClass you need to use the passed reference to the actor you set after creation.

1 Like

got it, thanks!

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