Setting Up SGGameModeBase
After installing and enabling the SenseGlove Unreal Engine Plugin, the easiest and most straightforward approach to get started is to just set the default GameMode to SGGameModeBase from Edit > Project Settings... > Maps & Modes > Default Mode > Default GameMode. By doing this, the Default Pawn Class is automatically set to SGPawn, and the Player Controller Class is set to SGPlayerController. This setup ensures that a SenseGlove pawn will automatically spawn when you hit the play button in the editor.

Tip
For greater control and customization, consider extending the SGGameModeBase.
Note
Currently, setting
SGGameModeBaseor a subclass of it as theDefault GameModeis not a strict requirement. Its primary function is to ensure that a defaultSGPawnandSGPlayerControllerare set. However, this might change in the future, and it could become a mandatory setting.
Important
While setting
SGGameModeBaseas theDefault GameModewill automatically spawn the default SGPawn at BeginPlay and initiate communication with the SenseGlove devices, it will not display any virtual hands in your simulation by default. You might still need to configure the Virtual Hand Meshes and the Wrist Tracking Hardware separately.
Important
Before starting the simulation in the editor, make sure that SenseCom is running and XR_EXT_hand_tracking is enabled. Without these, your simulation will not receive hand pose data from the SenseGlove devices.
Extending SGGameModeBase
Follow these steps to extend and set up your own version of SGGameModeBase:
- In the Content Browser, click the
+ Addbutton, then selectBlueprint Class from the menu. Alternatively, right-click inside the Content Browser and chooseBlueprint Classfrom the context menu.

- A dialog will appear asking you to choose a parent class. Click on the
ALL CLASSESsection to expand the list of available classes.

- In the expanded
ALL CLASSESsection, start typingSGGameModeBasein the Search box. WhenSGGameModeBaseappears, select it and click theSelectbutton to create your new Blueprint class based on it.

- After returning to the Content Browser, the Unreal Editor will prompt you to rename
NewBlueprintto your desired class name. You can rename the class at any time by pressingF2or by right-clicking on it and selectingRenamefrom the context menu.

- Once you have renamed the
NewBlueprintclass to your desired name, click onSave Allto save the new class to disk.

- Finally, set your newly created subclass of
SGGameModeBaseas theDefault GameMode. You can do this by navigating toProject Settings > Project > Maps & Modes > Default Modes > Default GameMode.
