コンテンツにスキップ

UserMessagingPlatform

UserMessagingPlatform クラスは、GDPRやその他のプライバシー規制に準拠するために、同意フォームのロードおよびプライバシーオプションフォームの表示を行う静的メソッドを提供します。

静的メソッド

同意フォームを非同期でロードします。結果は提供されたコールバックを通じて配信されます。

static func load_consent_form(
    on_consent_form_load_success_listener := func(consent_form: ConsentForm): pass,
    on_consent_form_load_failure_listener := func(form_error: FormError): pass
) -> void

使用法:

UserMessagingPlatform.load_consent_form(
    func(consent_form: ConsentForm):
        consent_form.show()
    ,
    func(form_error: FormError):
        print("同意フォームの読み込みに失敗: ", form_error.message)
)

public static void LoadConsentForm(
    Action<ConsentForm> onSuccess = null,
    Action<FormError> onFailure = null
)

使用法:

UserMessagingPlatform.LoadConsentForm(
    (consentForm) => consentForm.Show(),
    (formError) => GD.Print("同意フォームの読み込みに失敗: " + formError.Message)
);


show_privacy_options_form / ShowPrivacyOptionsForm

プライバシーオプションフォームを表示し、ユーザーが同意の選択を変更できるようにします。

static func show_privacy_options_form(
    on_privacy_options_form_dismissed := func(form_error: FormError): pass
) -> void

使用法:

UserMessagingPlatform.show_privacy_options_form(
    func(form_error: FormError):
        if form_error:
            print("プライバシーオプションフォームがエラーで閉じられました: ", form_error.message)
        else:
            print("プライバシーオプションフォームが正常に閉じられました")
)

public static void ShowPrivacyOptionsForm(
    Action<FormError> onPrivacyOptionsFormDismissed = null
)

使用法:

UserMessagingPlatform.ShowPrivacyOptionsForm(
    (formError) => {
        if (formError != null)
            GD.Print("プライバシーオプションフォームがエラーで閉じられました: " + formError.Message);
        else
            GD.Print("プライバシーオプションフォームが正常に閉じられました");
    }
);


静的プロパティ

同意ステータスを確認し、同意情報を更新するための ConsentInformation シングルトンへのアクセスを提供します。

static var consent_information: ConsentInformation
public static ConsentInformation ConsentInformation { get; }