We can enable creation of a set of debug files (see Debug Files Content below) which is saved in a vg_tmp subdirectory in your project’s Asset folder.
There are two ways to create them
Enabling Export Scene in Runtime allows you to create debug files after launching the scene in the Editor. The benefit of this is to be able to include objects you spawn in runtime or those you add by loading another scene during runtime into the debug files. Note the full debug files process is only in effect in development mode (i.e. using the Unity Editor), but not in builds.
Pressing Export Scene in Editor will simulate a launch of the VG plugin from the Unity Editor, thus without the need of launching the scene. This option is provided for convenience, but objects that are not in your scene yet will not be included.
Important: Each creation of debug files is scene-dependent, meaning that it only relates to the current Unity scene. Thus, to complement debug files from multiple scenes, you have to launch these scenes separately with Export Scene in Runtime enabled if you export in runtime, or press Export Current Scene after opening each scene.
Important: If creating of debug files is for the purpose of grasp baking, after export all scenes, you need to go to VirtualGrasp->Bake grasps->Prepare Project->Finish to complete the export for baking.
Important: It is recommended to delete the vg_tmp folder whenever you start with a new debug file creation process, since existing and potentially outdated data will not be deleted (only potentially overwritten).
Debug Files Content
One .obj file for each interactable object in the scene, i.e. raw 3D mesh data in uniform scale.
One .bin file for each avatar (containing one or a pair of hands of this avatar).
One .log file with VG log data (the same that also appears on the Console) for the scene that you are running, will be filled while you are running the scene.
One .scn and one .scn.objrig file for each scene, including scene configuration data (see section Debugging Interaction Issues to learn about these VG scene files).
Naming of the .zip and .db Files
By default, the .zip and .db files are given the name “grasps.zip” and “grasps.db”.
You can customize the name by modifying the VG_VirtualGraspDBFile that you can find in the VirtualGrasp/Resources folder.
How To Use The Debug Files
A .zip file of all the content in vg_tmp folder is the input that is needed for object baking.
Debugging Interaction Issues
When you stop the scene, two scene configuration files for each Unity or Unreal scene will be saved:
.scn: Is a JSON representation of the current state of the scene including VG interaction setup and all interactable objects’ status at the moment of saving.
.scn.objrig completely corresponds to the .scn file, but uses indentation to represent object hierarchy.
These scene files reveals how VG sees the status of your current scene in your VR application.
Because of this, they are very useful for you to debug any VG-related interaction issues that you experience.
object hierarchy: you thought you placed antenna as the child of radio. To see if it is really that way in VG, you can check the .scn file.
selection weight: you thought you have changed the selection weight on the antenna to 0, but it is actually not when checking the .scn file.
affordance: you thought you have set the radio to be pushable (FINGER_PUSHABLE), but it is actually only graspable (ONLY_GRASPABLE).
Since .scn files are written at the moment when you stop playing the scene, the saved information reflects your scene configuration at that moment.
So if you in runtime, for example, changed an object’s joint type or selection weight, then the resulting .scn files will reflect the effective values after your runtime changes.