uxf-tutorial

Part 0 - Introduction to Unity & UXF

Unity is a powerful 3D graphics engine used for video games, simulation software, and increasingly for developing human behaviour experiments. With Unity, you can create scenes in 2D or 3D using rich graphics and a built-in physics engine. Unity also supports virtual reality (VR) headsets, and is the preferred choice of many developers who create VR applications.

Unity in human behaviour experiments

Unity is relatively easy to use compared to other options, but may not be intuitive to those who have developed experiments in other programming environments (e.g. PsychoPy, PsychToolbox). Tasks such as reading and writing to CSV files which are essential for conducting research can be cumbersome for those new to Unity. The Unity Experiment Framework (UXF) was created to simplify the development of experiments in Unity. Not only does it make difficult tasks easy, but it gives you the skeleton of an experiment which you can use as a starting point. UXF is built around the idea of separating the specification of your experiment (the “what”) and the implementation of your experiment (the “how”).

Required reading

Before completing this tutorial you should have some basic experience with Unity. First work through the Unity roll-a-ball tutorial. For more experience, try to recreate a classic game like Pong, Pac-man, Minesweeper, Tetris, Flappy Bird, etc using Unity.

Then, you should read the open access UXF Paper and the UXF GitHub Page.

Also be aware of the UXF Wiki which should have up-to-date documentation on UXF.

Most importantly, make sure you are always referencing the Unity Documentation!