i put 3 vertical box with button inside the switcher. I play the game. and it switched normally. but i can only interact with button inside the first vertical box, I cannot interact with button inside the other vertical box.
i put 3 vertical box with button inside the switcher. I play the game. and it switched normally. but i can only interact with button inside the first vertical box, I cannot interact with button inside the other vertical box.
Hello, this issue is generally caused by the visibility of the parent control. Please ensure that the button can receive mouse click events (which means you need to set all controls above the button to be unhittable).
all above the button already unhittable by default.
i already create on click button event for all the button.
You can use the Widget Reflector during game runtime to view the UI hierarchy, ensuring that the button is visible and not obstructed by any visible controls above it.
How can I enable interaction with the buttons inside all vertical boxes in the switcher, not just the first one, when playing the game?
Based on the images you sent, I cannot determine the layout of your widget tree. Could you please send some more detailed images so that I can analyze them better? Additionally, if it’s a Switch component, please ensure that you have switched the index of the Switch through a function.
yes!
This issue is indeed quite strange. What you mean is that you can only click on the six buttons on the interface with Switcher index 0, but after switching to the interface with index 1 or 2, none of the six buttons can trigger a click event, right?
Even if you change the default index of the Switcher to 1 instead of 0, are you still unable to click on those six buttons? Or is it that after switching to index 1, you can click on the buttons for that index, but after switching again, you can’t click on the buttons for the new index?
it’s only work for index 0, no matter what number the default index is
i can only interact with button inside the first vertical box, I cannot interact with button inside the other vertical box
As was mentioned above - run the Widget Reflector
, see what the mouse is actually hitting. What is it over while it’s unable to connect with a button in the switcher’s index 1? My bet is it’s as simple as a Visibility
issue.
is there a reason behind not utilising user widgets? the hierarchy has been laid out manually three (or more) times? User widgets would have dramatically simplified scripting, layout and potentially trivialise solving issues and their debugging.
is the combination of the vertical / horizontal boxes even necessary? This is just a simple grid with soooo many extra steps.
Do consider re-jiggling the hierarchy and wrap the repetitive elements with user widgets.