Skip to Content
NOTE: StarWatch is in beta. We're actively improving these docs - check back for updates!
Get StartedUnreal Engine SDK

Unreal Engine SDK

Integrating Unreal with Starwatch is a two-part process. First, your Starwatch Instance needs to be created within the StarWatch Manager. Then the StarWatch SDK needs to be installed and integrated into your project.

Collect credentials

  1. Go to the manager site. 
  2. Select your team.
  3. Select Manage on the instance.
  4. Click to copy your app key and API URL.

Have these items ready to use for the installation process.

Install

  1. Download the SDK ZIP package from here.
  2. Unzip the content.
  3. Copy the content to the Plugins folder.
  4. Go to Edit > Project Settings, then search for StarWatch.
  5. Add in the StarWatch URL and API keys pulled from the above steps.
  6. Restart your editor.

Example of folder structure

Set up actors

Actor initialization

To begin sending events to StarWatch, you first need to initialize a player.

  1. In the player’s actor blueprint, search for StarWatch Publisher Subsystem. This creates a reference to the publishing stack.
  2. Drag and drop from the StarWatch Publisher Subsystem output, and search for and select Initialize Player from the popup prompt. This configures the actor to send user data to StarWatch.

Actor Initialization Blueprint

Actor cleanup

To indicate to StarWatch that a player’s session has ended, run the Cleanup Player function. Without this, the game will continue to send empty events to StarWatch.

Set up a Cleanup Player node in an identical way. Drag another node from the existing StarWatch Publisher Subsystem, or create a copy (which will reference the same subsystem–no need to worry about creating multiple subsystems) and attach User ID to it.

Actor Cleanup Blueprint

Submit a game state

Note

This content is optional for seeing users move around the map, but required for event based features.

Submit events

Learn what events do.

  1. Create a StarWatch Publisher Subsystem node.
  2. From the StarWatch Publisher Subsystem, create a Submit General Event node.
  3. Connect an exec pin from your trigger to the Submit General Event node.
  4. Set the event name.
  5. Give the player a distinct ID.

Submit Gauge

Set gauges

Learn what gauges do.

Setting gauges is very similar to setting events.

  1. Create a StarWatch Publisher Subsystem node.
  2. From the StarWatch Publisher Subsystem, create a Set Gauge node.
  3. Connect an exec pin from your trigger to the Submit General Event node.
  4. Set the gauge name.
  5. Give the player a distinct ID.

Submit Event

Integrate 3D terrain

StarWatch uses GL Transmission Format Binary file (.glb) as level maps.

Export terrain

Select the content you want to export based on what you would consider terrain. You can use this search to help:

NOT Light NOT Fog NOT Camera NOT PostProcess NOT Volume NOT Audio NOT SkyAtmosphere NOT Niagara NOT Trace NOT Ray NOT Probe NOT NavMesh

Selecting relevant outliner content

  1. Select File > Export Selected.
  2. In the save dialog, change the file type to glb.
  3. In the export dialog, disable everything (StarWatch does not utilize lighting information, etc.)

Export options example

Tip

Consider optimizing your exports even more by following our the terrain optimization guide.

Upload to StarWatch

Once you have your terrain file:

  1. Click the , and go to the Game Legend.
  2. Open the Game Levels tab.
  3. Select the Upload Map button to assign a glb to that level, which will then appear in the map view.
Warning

In order for levels to appear on this page there must be recent data sent to StarWatch about that level, or it must have been previously configured.

Persistent Level