Please see the documentation here
Example project for controlling a VR experience through UI as a spectator