What is Toggle?

Togle

Toggle is a tool that allows researchers to alter and monitor the behavior of all the variables in an experiment. Toggle also helps with the logging and statistical analysis of this data.

Historically, the word toggle means to switch between two positions, on and off. It is used for hardware switches like a keyboard’s Caps Lock and Num Lock keys as well as software-based settings, such as the ones found in options menus in many applications. In general, toggles are a simple way to switch between two options or modes of operation, often through one button press or keystroke.

In our context, toggles are a powerful feature in Unity that permit unified and streamlined object attribute manipulation for experiment design purposes. While object attribute manipulation is a native Unity functionality and can be accomplished through the inspector GUI, Toggle provides a single interface that permits continuous changes to multiple objects.

Toggle works by linking triggers to toggle scripts, which can alter the settings of all objects that they link to. Triggers can specify a set of keys (from a generic keyboard or other key-outfitted controller devices) and a list of objects to trigger for each of these keys. During run-time, the trigger scripts will listen for user keys and, if a key in its list is pressed, will trigger its associated toggles.

Triggers can also include a set of state descriptors, such as On and Off to indicate the current toggle status. It is important to note that when choosing colors for state descriptors, it is best to choose high contrast colors to ensure they are visible. Furthermore, it is important to consider societal and cultural differences when deciding which colors to use for on/off states, as these can have significant implications for the user experience.