Cannot add child to the container in UI

Hello everyone. Can someone help? I have terminals and doors on the level with different ID’s i want my UI to spawn door control buttons if ID’s match with the current hit actor. But unfortunately my widget just cannot clear or create widgets inside my horizontal box. It works just fine if i get all actors of class (doors) and then compare but it doesn’t work when i check ID from the hit actor. Thanks

sorry i cant read the screenshot. the font is very tiny.


Sorry compression

all good thanks.
your ids are string. any way you could convert them to fname? they’d be faster and compare better.
also you might want to store the terminalId in a local variable.

Thanks for the tip i replaced strings ID’s with name and checked all comparing logic and it works just fine. The problem start when i compare id with current hit actor which is bp_terminal. Maybe the poblem is that my widget is not on the screen but it’s a widget component?

maybe you’re passing the wrong component.
what’s the code that calls the funciton above?

I have line trace and passing hit actor (BP_terminal) to the widget to get updated terminal name, print string shows i pass the right name i have 2 terminals with a different ID’s and they show correctly when i interact with it

then you’re probably using the wrong object. maybe using the bp instead of the component.
or maybe it collides with another component.
also be aware that a widget component is not the wigdet. you have to call getwidget or smth to obtain the widget.


Im sending bp_terminal actor because it was hit and it contains current id is it wrong?