Skip to content
FirstLook Docs

FirstLook SDK Setup Guide

The FirstLook SDK is an Unreal Engine plugin that will allow you to interface with FirstLook from your Unreal game. The plugin currently supports Steam login as well as in-game surveys. The primary access point for the FirstLook SDK is the UFirstLookSubsystem which exposes a number of methods and delegates used to interact with FirstLook.

For this setup guide, we will assume you have an Unreal game project named MyGame.

  1. Acquire the FirstLookSDK from the admin dashboard. Download
SDK

  2. Setup your Steam game in FirstLook. See the Steam Integration.
  3. Invite a test player to your playtest with their Steam account linked. See the Inviting Players.

Setting up the FirstLookSDK Plugin in Unreal

Section titled “Setting up the FirstLookSDK Plugin in Unreal”

Now that you’ve acquired the FirstLookSDK and set up your game in FirstLook, we can install the plugin into your Unreal project.

  1. Move the FirstLookSDK plugin to MyGame/Plugins/FirstLookSDK. Create the MyGame/Plugins directory if one does not already exist.

  2. Register the FirstLookSDK plugin in the MyGame.uproject file.

    "Plugins": [
    {
    "Name": "FirstLookSDK",
    "Enabled": true
    }
    ]
  3. Add the FirstLookSDK plugin as a dependency in the MyGame.Build.cs file.

    PrivateDependencyModuleNames.AddRange(new string[] {"FirstLookSDK"});
  4. In the Unreal Editor, configure the FirstLookSDK plugin settings for FirstLookApiURL and FirstLookClientURL under:

    Edit > ProjectSettings > Plugins > FirstLook Plugin Settings

    • Alternatively, configure the plugin in the DefaultGame.ini file:

      [/Script/FirstLookSDK.FirstLookSDKSettings]
      FirstLookApiURL="https://api.firstlook.gg"
      FirstLookClientURL="https://<game-slug>.firstlook.gg"

    To find your client URL, check your domain from your FirstLook settings: Client URL

  5. Configure OnlineSubsystemSteam in the DefaultEngine.ini file.

    [OnlineSubsystem]
    DefaultPlatformService=Steam
    [OnlineSubsystemSteam]
    bEnabled=true
    SteamDevAppId=<steam-app-id>
  6. Setup Unreal CommonUI.

    • Follow Step 1 of this guide to set the default Game Viewport Client Class to CommonGameViewportClient.

Now that the FirstLookSDK Unreal plugin is properly setup, FirstLook Steam login will work out of the box since it is automatically called during the FirstLook subsystem initialization. There are just a few steps we need to take in order to test the integration locally.

  1. In the Unreal Editor, enable logging for Standalone Game mode

    • Under Edit > Editor Preferences, navigate to:

      Level Editor > Play > Play in Standalone Game > Additional Launch Parameters

    • Add -log as a launch parameter

    • Standalone Logging

  2. Play as Standalone Game

  3. In the output log, you should see log line indicating a successful login from the LogFirstLookSDK log category

    • e.g. LogFirstLookSDK: Verbose: Login succeeded.

Now that you are able to successfully login to FirstLook, you will be able to use the FirstLook subsystem to trigger in-game surveys.

  1. Create a survey with game client distribution enabled. See the Creating a Survey

  2. Setup a trigger for your newly created survey. See the Setting Up Triggers.

  3. Register the survey delegates in Unreal:

    UFirstLookSubsystem::OnNewNativeSurveyAvailable:

    • The WBP_Survey_Screen widget should be displayed when this delegate is called. This widget can be found under: MyGame/Plugins/FirstLookSDK/Content/UI_Survey/Widgets/WBP_Survey_Screen.uasset

    UFirstLookSubsystem::OnNewBrowserSurveyAvailable:

    • Hooked up by default to show a Steam browser overlay using UFirstLookSubsystem::ActivateSurveyBrowserOverlay

  4. Make a call to UFirstLookSubsystem::PostEvent with the trigger you created for your survey. If the trigger condition is met, this will trigger one of the delegates that we setup in the previous step depending on the configured survey distribution channel.