private void CreateUserConsentSection() { GUILayout.Space((float)this._sectionMarginSize); GUILayout.Label("User Consent", Array.Empty <GUILayoutOption>()); GUILayout.Label("Can collect personally identifiable information: " + this._canCollectPersonalInfo, this._smallerFont, Array.Empty <GUILayoutOption>()); GUILayout.Label("Current consent status: " + this._currentConsentStatus, this._smallerFont, Array.Empty <GUILayoutOption>()); GUILayout.Label("Should show consent dialog: " + this._shouldShowConsentDialog, this._smallerFont, Array.Empty <GUILayoutOption>()); GUILayout.Label("Is GDPR applicable: " + (!this._isGdprApplicable.HasValue ? "Unknown" : this._isGdprApplicable.ToString()), this._smallerFont, Array.Empty <GUILayoutOption>()); GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>()); GUI.set_enabled(!this.ConsentDialogLoaded); if (GUILayout.Button("Load Consent Dialog", Array.Empty <GUILayoutOption>())) { this.UpdateStatusLabel("Loading consent dialog"); MoPubAndroid.LoadConsentDialog(); } GUI.set_enabled(this.ConsentDialogLoaded); if (GUILayout.Button("Show Consent Dialog", Array.Empty <GUILayoutOption>())) { this.ClearStatusLabel(); MoPubAndroid.ShowConsentDialog(); } GUI.set_enabled(!this._isGdprForced); if (GUILayout.Button("Force GDPR", Array.Empty <GUILayoutOption>())) { this.ClearStatusLabel(); MoPubAndroid.ForceGdprApplicable(); this.UpdateConsentValues(); this._isGdprForced = true; } GUI.set_enabled(true); if (GUILayout.Button("Grant Consent", Array.Empty <GUILayoutOption>())) { MoPubAndroid.PartnerApi.GrantConsent(); } if (GUILayout.Button("Revoke Consent", Array.Empty <GUILayoutOption>())) { MoPubAndroid.PartnerApi.RevokeConsent(); } GUI.set_enabled(true); GUILayout.EndHorizontal(); }