Unity - Use fallback paywalls
To use fallback paywalls:
- Save fallback paywalls to files in
/Assets/StreamingAssets/
, 1 file for Android and another for iOS. - 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:
Parameter | Description |
---|---|
assetId | The path to the fallback JSON file you downloaded in the Adapty Dashboard. |