Skip to main content

Unity - Use fallback paywalls

To use fallback paywalls:

  1. Save fallback paywalls to files in /Assets/StreamingAssets/, 1 file for Android and another for iOS.
  2. Pass the file names to the SetFallbackPaywalls method. Place this method in your code before fetching a paywall, ensuring that the mobile app possesses it when a fallback paywall is required to replace the standard one.
Unity
using AdaptySDK;

void SetFallBackPaywalls() {
#if UNITY_IOS
var assetId = "adapty_fallback_ios.json";
#elif UNITY_ANDROID
var assetId = "adapty_fallback_android.json";
#else
var assetId = "";
#endif

Adapty.SetFallbackPaywalls(assetId, (error) => {
// handle the error
});
}

Parameters:

ParameterDescription
assetIdThe path to the fallback JSON file you downloaded in the Adapty Dashboard.