Force Show Rate Popup With Callback

Description

Shows the rate popup even if not all conditions from the Settings Window are met with additional callback parameters.

Declaration

public static void ForceShowRatePopupWithCallback(UnityAction<PopupOptions, string> popupClosed = null)

Parameters

NameDescription

popupClosed

Optional Callback called when the Rate Popup was closed. Requires using Gley.RateGame;

Example

using Gley.RateGame;
public class Test : MonoBehaviour
{
    public void ShowRatePopup()
    {
        Gley.RateGame.API.ForceShowRatePopupWithCallback(PopupClosed);
    }

    private void PopupClosed(PopupOptions result, string message)
    {
        switch (result)
        {
            case PopupOptions.Never:
                Debug.Log("Never button was press from in-game popup");
                break;
            case PopupOptions.Rated:
                Debug.Log("Send/Yes button was press from in-game popup");
                break;
            case PopupOptions.NotNow:
                Debug.Log("Later button was press from in-game popup");
                break;
            case PopupOptions.NativeFailed:
                Debug.Log($"Native popup failed to display. Reason {message}");
                break;
            case PopupOptions.NativeSuccess:
                Debug.Log("Native popup displayed");
                break;
        }
    }
}

Last updated