public bool allowSwitchOff ;

描述

是否允许不打开任何开关?

如果启用此设置,则按下当前打开的开关会将其关闭,因此没有任何开关处于打开状态。如果禁用此设置,则按下当前打开的开关将不改变该开关的状态。

Note that even if allowSwitchOff is false, the Toggle Group will not enforce its constraint right away if no toggles in the group are switched on when the Scene is loaded or when the group is instantiated. It will only prevent the user from switching a toggle off.