I have this shop system that when I am in the box collision I am able to hit ‘x’ to open the shop widget. But the problem is that if you keep hitting ‘x’ to open the widget it keeps adding the widget to viewport even if it is already there. So if that happens and you hit the exit button in the widget to remove it from viewport, all the other added widgets are still there. How would I fix this?
where are you creating the widget?
it could be as simple as when the widget is created you promote it to a variable. then you add in a is valid check before creating the widget which checks to see if the widget already exists.
and this way as well
Ok after create widget drag off return value and promote to varaible name it shop widget now grab the reference drag it to the very front of the and get it then right click on that and convert to validate get and then on is not valid hook up the rest of the code and on is valid remove from parent
I tried ThompsonN13’s way and it worked for the important part, BUT now it doesnt work and I dont know why.
It worked for Event ActorBeginOverlap but not my InputAction