Creating Debug Files
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.
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 .db file carrying data filled with VG_GraspAnnotator or VG_BakingClient.
- 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. For example:
- 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).