Description
MyVirtualGrasp is a public script inherited from VG_MainScript, which encodes the main functionality of VirtualGrasp.
In contrast to MyVirtualGrasp, this component uses Burst Jobs to isolate VG updates on seperate threads.
Burst Configuration
The only additional element to to the standard GUI elements is the “Burst Parameters” section.

As you can see in the MyVirtualGraspBurst.cs script, you can control the behavior by selecting your number of threads as follows:
- If the number of threads is 0, VirtualGrasp will run on the MainThread. That means the behavior is exactly equal to MyVirtualGrasp.cs.
- If the number of threads is 1, VirtualGrasp will spawn a SingleWorkerThread with Burst. You need to have Burst installed and the define enabled in MyVirtualGraspBurst.cs.
- If the number of threads is N>1, VirtualGrasp will spawn N MultipleWorkerThreads with Burst. You need to have Burst installed and the define enabled in MyVirtualGraspBurst.cs.
Burst Communication with VG
VirtualGrasp works in mainly three steps:
- send incoming data from Unity to VirtualGrasp,
- compute the hand and object animations in VirtualGrasp,
- send outgoing data from VirtualGrasp back to Unity and reflect it there.
Therefore, the API offers isolated functions specifically for multi-threading for those three steps:
While 1. and 3. are merely data transfer tasks, 2. is the “heavy” lifting and the main blocker on Unity’s main thread.
In MyVirtualGraspBurst.cs 1. and 3. are therefore called in the FixedUpdate() loop, while 2. is placed on a separate thread.