Use the SDK
2
Set Up PlaytimeOptions and ShowCatalog
private PlaytimeOptions BuildPlaytimeOptions() {
PlaytimeOptions options = new PlaytimeOptions();
PlaytimeParams adjoeParams = new PlaytimeParams();
adjoeParams.SetUaNetwork("init-ua-network")
.SetUaChannel("init-uaChannel")
.SetUaSubPublisherCleartext("init-ua-subpublisher-cleartext")
.SetUaSubPublisherEncrypted("init-ua-subpublisher-encrypted")
.SetPlacement("init-placement")
.setPromotionTag("promotion-id");
options.SetPlaytimeParams(adjoeParams);
PlaytimeExtensions extensions = new PlaytimeExtensions();
extensions.SetSubId1("init-subid1")
.SetSubId2("init-subid2")
.SetSubId3("init-subid3");
options.SetPlaytimeExtensions(extensions);
PlaytimeUserProfile userProfile = new PlaytimeUserProfile();
userProfile.SetGender(PlaytimeGender.MALE)
.SetBirthday(DateTime.Parse("1990-05-15T00:00:00.000Z"));
options.SetPlaytimeUserProfile(userProfile);
options.SetUserId("USER_ID");
options.SetSdkHash("YOUR_SDK_HASH");
return options;
}
void Start()
{
PlaytimeOptions options = BuildPlaytimeOptions();
Playtime.ShowCatalogWithOptions(
options,
() =>
{
Console.WriteLine("✅ ShowCatalogWithOptions Success!");
},
error =>
{
Console.WriteLine($"❌ ShowCatalogWithOptions Error: {error.Message}");
}
);
}
}Using setPlaytimeOptions
Playtime.SetPlaytimeOptions(
PlaytimeOptions options,
Action onSuccess,
Action<Exception> onError
);Using getStatus to showCatalog
public class PlaytimeManager : MonoBehaviour
{
private PlaytimeOptions BuildPlaytimeOptions()
{
PlaytimeOptions options = new PlaytimeOptions();
PlaytimeParams adjoeParams = new PlaytimeParams();
adjoeParams.SetUaNetwork("ua-network")
.SetUaChannel("uaChannel")
.SetUaSubPublisherCleartext("uasubpublishercleartext")
.SetUaSubPublisherEncrypted("uasubpublisherencrypted")
.SetPlacement("placement")
.SetPromotionTag("promotion-id");
options.SetPlaytimeParams(adjoeParams);
PlaytimeExtensions extensions = new PlaytimeExtensions();
extensions.SetSubId1("subid1")
.SetSubId2("subid2")
.SetSubId3("subid3");
options.SetPlaytimeExtensions(extensions);
PlaytimeUserProfile userProfile = new PlaytimeUserProfile();
userProfile.SetGender(PlaytimeGender.MALE)
.SetBirthday(DateTime.Parse("1990-05-15T00:00:00.000Z"));
options.SetPlaytimeUserProfile(userProfile);
options.SetUserId("USER_ID");
options.SetSdkHash("YOUR_SDK_HASH");
return options;
}
void Start()
{
var status = Playtime.GetStatus();
Debug.Log($"ADJOE - Current SDK Status: {status}");
if (status != null && status.IsInitialized)
{
try
{
PlaytimeOptions options = BuildPlaytimeOptions();
Playtime.ShowCatalogWithOptions(
options,
() =>
{
Debug.Log("✅ ShowCatalogWithOptions Success!");
},
error =>
{
Debug.LogError($"❌ ShowCatalogWithOptions Error: {error.Message}");
}
);
}
catch (Exception e)
{
Debug.LogError($"ADJOE - Error launching catalog: {e.Message}");
}
}
else
{
Debug.LogWarning("ADJOE - SDK is not initialized yet. Please try again in a moment.");
}
}
}Parameters
Parameter
Explanation
App Tracking (iOS Only)
Last updated
