I have a group of toggles in a toggle group so that a player can select a character to start the game with.
This works. I can click outside of the toggle and it stays selected.
My issue is that when I click in a text box to name the character, the toggle gets set to its starting, not clicked state. I have “Deselect on Background Click” turned off in the UI Input module, but it doesn’t seem to help.
Is there a way to keep the toggle active when clicking on another type of UI element? It seems a bit strange to me that we can’t stop the system from selecting something like a text input.
there are 2 concepts: selected and toggled (or “activated”)
you’re likely thinking selected = toggled
selected is useful for, let’s say, consoles where. you don’t have a mouse
I guess what you want is, when the user selects a toggle, you have to manually trigger it (via code or something)
but, if you really mean that you want the toggle to stay “selected” instead of “toggled”, I don’t think it’s functionally possible (you can only do it visually to trick the user)
the last case, you might really mean “the toggle is untoggled when I focus on the textbox”, in which case the only explanation is your code does it (or a bug in unity)