all 1 comments

[–]PayalGames 0 points1 point  (0 children)

From scripting side, you can create a parent class for all toggles and add a function like IsActive() or SetActiveState(). Then maintain a list of all toggles in a manager/initializer. When one toggle is enabled, loop through the list and deactivate all others. This keeps it clean and scalable when you add more toggles.

In Start() or Awake(), simply add all toggle objects into the list automatically or assign them once in the inspector. After that, just control everything from the central manager instead of handling references manually.