Advanced Configuration

Configure beta Superwall Unity SDK options and advanced APIs.

SuperwallOptions lets you tune paywall behavior, logging, locale, test mode, and platform-specific behavior at configuration time.

using System.Collections.Generic;
using Superwall;

var options = new SuperwallOptions
{
    NetworkEnvironment = NetworkEnvironment.Release,
    TestModeBehavior = TestModeBehavior.Automatic,
    IsGameControllerEnabled = true,
    Logging = new Logging
    {
        Level = LogLevel.Debug,
        Scopes = new List<LogScope> { LogScope.PaywallPresentation }
    },
    Paywalls = new PaywallOptions
    {
        ShouldPreload = true,
        AutomaticallyDismiss = true,
        ShouldShowPurchaseFailureAlert = true,
        RestoreFailed = new RestoreFailed
        {
            Title = "No Subscription Found",
            Message = "We couldn't find an active subscription for your account.",
            CloseButtonTitle = "Okay"
        }
    }
};

Superwall.Configure("MY_PUBLIC_API_KEY", options: options);

SuperwallOptions

Prop

Type

PaywallOptions

Prop

Type

Preloading

Superwall.Shared.PreloadAllPaywalls();

Superwall.Shared.PreloadPaywallsForPlacements(new List<string>
{
    "onboarding",
    "upgrade"
});

Locale

Superwall.Shared.LocaleIdentifier = "es_ES";

Local Resources

Android builds can map paywall asset names to local file paths.

Superwall.Shared.SetLocalResources(new Dictionary<string, string>
{
    { "hero_image", "/absolute/path/to/hero.png" }
});
SetLocalResources is Android-only in the current beta. It is a no-op on iOS.

Programmatic Purchase and Products

Superwall.Shared.GetProducts(new List<string> { "monthly", "annual" }, products =>
{
    foreach (var product in products)
    {
        Debug.Log($"{product.Key}: {product.Value.LocalizedPrice}");
    }
});

Superwall.Shared.Purchase("monthly", result =>
{
    Debug.Log($"Purchase result: {result.Type}");
});

For normal paywall flows, prefer RegisterPlacement.

How is this guide?

On this page