GamebeastDocs
Dashboard
Unreal SDKAPI Reference

Cohorts

This API is used to check the local player's membership in cohorts defined on the Gamebeast dashboard.

For more information about Cohorts, visit the User Cohorts Guide.

#include "GamebeastCohorts.h"

UGamebeastCohorts* GamebeastCohorts = UGamebeastSubsystem::Get(this)->GetCohorts();

IsMember(CohortName, Callback)

voidreturn type

Checks whether the local player is a member of the named cohort, and calls Callback with the answer on the game thread. The answer is false when the cohort doesn't exist (the SDK logs a warning) or the check fails.

Results are cached for a minute, and lookups of the same cohort made while one is in flight share it. Membership is recomputed by the backend, so treat it as eventually consistent rather than real-time.

CohortNameFString

The name of the cohort.

CallbackTFunction<void(bool)> or FGamebeastCohortResult

Called with whether the player is a member.

Usage

GamebeastCohorts->IsMember(TEXT("High Spenders"), [WeakThis = TWeakObjectPtr<AMyShop>(this)](bool bIsMember)
{
    if (AMyShop* Shop = WeakThis.Get(); Shop && bIsMember)
    {
        Shop->ShowVipOffer();
    }
});

In Blueprint, use the Is Cohort Member async node: its On Result pin fires with the answer.

On this page