In-App Ads In-App Billing Analytics And Attribution Consent Management (GDPR) Remote Config Google Play Games Services Rate Us PopUp
It’s a game-changer, making implementation easy, saving you valuable time, and cutting down costs!
Say goodbye to integration headaches!
Focus on what you do best— Creating amazing games!
using Plankton;
//Initialize
var provider = Ad.Provider.Admob; // or Ad.Provider.AppLovin
Ad.Initialize(provider, BANNER_UNIT_ID, provider, INTERSTITIAL_UNIT_ID, provider, REWARDED_UNIT_ID);
// Show Banner
Ad.Banner = true;
// Show Interstitial
Ad.ShowInterstitial(new Ad.Place(Ad.Type.Interstitial, "inter_placement"), () => Debug.Log("Ad closed."));
// Show Rewarded
Ad.ShowRewarded(new Ad.Place(Ad.Type.Rewarded, "rewarded_placement"), rewardEarned => Debug.Log($"Ad closed."));
using Plankton;
// Initialize
Billing.Initialize(succeed => Debug.Log($"GooglePlay Billing initialization result:{succeed}"));
// Get List of Purchases
Billing.GetPurchases((succeed, purchaseList) => { /* Process purchase list */ });
// Get Product Details
var productIds = new string[] {"product_sku_1", "product_sku_2"};
Billing.GetSkuDetails((succeed, productDetailList) => { /* Process product details */ }, productIds);
// Make Purchase
Billing.Purchase("product_sku", "", "", (status, token) =>
{
Debug.Log($"Purchase result:{status}, purchase token:{token}");
if (status == Billing.Status.PurchaseStatus.Purchased)
{
// Give product to player and consume/acknowledge the product
Billing.Consume(token, (succeed, token) => {} ); // or call Billing.Acknowledge()
}
});
using Plankton;
using static Plankton.GeneralAnalytics;
// Initialize
GeneralAnalytics.Initialize();
// Set User Property
var providers = Provider.Firebase | Provider.Yandex;
GeneralAnalytics.SetUserProperty(providers, "property_key", "property_value");
// Send Event
var eventProviders = Provider.Firebase | Provider.Appsflyer | Provider.Yandex;
var parameters = new Dictionary<string, string>() {
{ "param_1", "value_1"},
{ "param_2", "value_2"},
{ "param_3", "value_3"},
};
GeneralAnalytics.LogEvent(eventProviders, "event_name", parameters);
using Plankton;
// Update user consent info
GoogleUmp.RequestConsentInfoUpdate((succeed, error) => Debug.Log($"Is successful:{succeed}, Error:{error}"));
// Show consent form if required
GoogleUmp.LoadAndShowConsentFormIfRequired((succeed, error) => Debug.Log($"Is successful:{succeed}, Error:{error}"));
// Check if ads can be shown
bool canRequestAds = GoogleUmp.CanRequestAds();
using Plankton;
// *** Firebase Remote Config ***
// Fetch whole remote config
GeneralAnalytics.RemoteConfig.Fetch(json => Debug.Log($"Fetch Successfull! configs:{json}"), () => Debug.Log("Fetch Failed!"));
// Get a specific value for a given key
var configValue = GeneralAnalytics.RemoteConfig.Get("config_key", "default_value");
// *** GameAnalytics Remote Config ***
// No need to manually fetch
var isReady = GameAnalytics.IsRemoteConfigsReady();
if (isReady){
// Get a specific value for a given key
var value = GameAnalytics.GetRemoteConfigsValueAsString("config_key", "default_value");
}
using Plankton;
// Sign-In to google account
PlayServices.SignIn(succeed => Debug.Log($"Play Services signin result:{succeed}"));
// Save player data
PlayServices.Save("Data to be saved", succeed => Debug.Log($"Save result:{succeed}"));
// Load player data
PlayServices.Load(data => Debug.Log($"Load result:{data}"));
using Plankton;
// Show Google's rate us pop-up
Utils.ShowRateUs(succeed => Debug.Log($"Rate us popup display result:{succeed}"));
Input your search keywords and press Enter.