Head mounted mode in Unity is really three things:
- Setting the IsHeadMounted flag on the LeapHandController (LeapServiceProvider script).
- Parenting the LeapHandController under the camera used for VR rendering so that it moves with head-tracking
- Rotating the LeapHandController so that it is facing along the camera's direction of view -- basically putting it in the same orientation to the camera in the virtual world as the orientation of the real device to your real eyes. (Offset is handled in the shader, not the transform.)
There are also several other things going on to make it a smooth experience. So, it would be difficult to make a simple switch to change from one to the other. You can either make two different scenes and load one or the other as appropriate, or create two object hierarchies, one for desktop and one for VR and enable/disable them.