Skip to content

Remote Controls

The A/B testing and Remote Configurations features allow you to customize the behavior of your app based on different conditions or User Segments. Remote Variables can be a powerful tool during feature development and managing live apps by serving settings that are managed remotely.

A/B Testing

An A/B test is a configuration that randomly returns one of several variants to the application. This allows developers to test different variants of a feature, setting, or content to see which performs better. The test can involve multiple user groups, each receiving different versions of the variable to compare performance or user engagement.

For example, you could use an A/B Test to select a different layout for your main menu. After one hundred players have seen each variation, you can analyze the results on the Dashboard to see which one leads to more feature usage and longer user retention.

Remote Configurations

A Remote Configuration refers to a set of rules for returning a specific Remote Variable to the application. You can use these configurations to modify gameplay mechanics, user experience, or performance-related aspects dynamically.

For example, you could use a Remote Configuration to control guidance in a VR training experience. After a couple weeks in which employees are guided through a process, the guidance in the VR app could be turned off. You could then use the Dashboard to measure employee completion rates to ensure your training knowledge is being retained.

Remote Controls Setup

1. Create Remote Variables

To start using Remote Variables in Unreal Engine, you'll need create Remote Variables on the Dashboard. See Dashboard Remote Controls for details.

2. Remote Controls in Unreal Engine

In the Unreal Engine Editor, make sure the RemoteControls component is on the BP_Cognitive3DActor Actor in your scene. When you click it, you should see this in the details panel. These options allow for some behavior customization for your project's Remote Controls.

Remote Controls component

The component will try to identify the ParticipantId to be used with Sticky A/B Tests. This option on the Dashboard will consistently return variants to the same user. If this ParticipantId is not available, it will fall back and use the DeviceId instead. You can adjust the following settings:

  • Fetch Variables Automatically - When enabled, this component will return Remote Variables from our Dashboard when the Session starts. If Use Participant Id is true, it may wait for the ParticipantId to be set if it is not already.

  • Use Participant Id - When enabled, the ParticipantId will be used to identify the Session to fetch Remote Variables. If disabled, the DeviceId will be used instead.

  • Wait for Participant Id Timeout - This field defines the amount of time the Cognitive3D SDK will wait for the ParticipantId to be set if it is not already available at the start of the session. If the ParticipantId is not set within this time, the DeviceId will be used to identify the Session.

API Reference

Fetching Remote Variables

To manually fetch the Remote Variables from the Dashboard (instead of using the Automatic toggle on the component), using either a custom Participant Id, or the default Device Id, you can call the FetchRemoteControlVarible function.

Fetch Remote Control Variables

TSharedPtr<FAnalyticsProviderCognitive3D> cog = FAnalyticsCognitive3D::Get().GetCognitive3DProvider().Pin();
if (cog.IsValid())
{
    //using a custom ParticipantId
    cog->remoteControls->FetchRemoteControlVariable("ParticipantId");
    //using the default DeviceId
    cog->remoteControls->FetchRemoteControlVariable();
}

Using Remote Variable Value

To use a Remote Variable, first ensure that you've queried the Variables from the Dashboard (either automatically from the component settings, or the function call described above). You can access the Variable's value using the following code:

Remote Control Getters

TSharedPtr<FAnalyticsProviderCognitive3D> cog = FAnalyticsCognitive3D::Get().GetCognitive3DProvider().Pin();
if (cog.IsValid())
{
    int32 RemoteControlInt = cog->remoteControls->GetRemoteControlVariableInt("test", 0);
    bool RemoteControlBool = cog->remoteControls->GetRemoteControlVariableBool("test", false);
    FString RemoteControlString = cog->remoteControls->GetRemoteControlVariableString("test", "default");
}

You can also use the OnRemoteControlsReceived event to wait until the Remote Variables are available:

Remote Control Event

TSharedPtr<FAnalyticsProviderCognitive3D> cog = FAnalyticsCognitive3D::Get().GetCognitive3DProvider().Pin();
if (cog.IsValid())
{
    cog->remoteControls->OnRemoteControlVariableReceived.AddDynamic(this, &UMyClass::OnRemoteControlVariableReceived);
}

intercom If you have a question or any feedback about our documentation please use the Intercom button (purple circle) in the lower right corner of any web page.