ABTestManager is a tool used to test different versions of the game. It helps you determine which features or interface designs perform better by dividing players into different test groups.
// To add a new test group:
ABTestManager abManager = FindObjectOfType<ABTestManager>();
abManager.AddTestGroup("NewFeature", false);
// To check if a player is in a specific test group:
if (abManager.IsPlayerInSample("NewFeature")) {
// Activate this feature
}
AdsManager is the class that manages ad displays in the game. This class provides support for two types of ads: rewarded ads and interstitial ads.
Rewarded ads are used in the following situations in the game:
adsManager.ShowRewarded(
// On successful completion
() => {
// Give reward to player
data.IncomeIndex++;
EventManager.Broadcast(GameEvent.OnPlaySound, "AddPop");
},
// When ad is skipped or can't be loaded
() => {
Debug.Log("Ad skipped or failed to load");
}
);