Toggle toolkit: A tool for conducting experiments in unity virtual environments

Behav Res Methods. 2021 Aug;53(4):1581-1591. doi: 10.3758/s13428-020-01510-4. Epub 2021 Jan 6.

Abstract

This article presents and offers Toggle Toolkit, which is an original collection of Unity scripts designed to control various aspects of interactive 3D experiments. The toolkit enables researchers in different fields to design, conduct and evaluate experiments and include interactive elements in immersive virtual environments. This was achieved by using the internal functionalities of the Unity engine and solutions of our own design. The structure of Toggle Toolkit allows triggers and toggles to be allocated to existing virtual objects and throughout the Unity scene. Once a trigger is executed (with a pre-described action, such as colliding with a virtual object, pressing a key, gazing at an object, etc.), the toggles associated with the trigger are activated and then change the attributes or behaviors of linked objects. All interactive behavior is logged and made available for further statistical analysis. Examples of applications in research are presented and discussed. The Toggle Toolkit's utility lies in its simplicity and modularity. The Toolkit was especially produced for experimenters with few coding skills and high customization requirements in their experiments. The tool is freely available for use in research and can be enhanced with custom scripts. A video tutorial is provided to facilitate use of the tool. The paper aims to not only introduce beginners to experimentation with VR but also offers more experienced researchers who are potentially interested in using and adjusting the features the Toolkit a deeper insight into its structure.

Keywords: 3D visualization; Behavioral analysis; Dynamic visualization; Event logger; Experiment design; Interactivity; Virtual environment; Virtual reality.

Publication types

  • Research Support, Non-U.S. Gov't

MeSH terms

  • Humans
  • User-Computer Interface
  • Virtual Reality*