From cc2a6524f829e3fa8fdd3204ceecd2128d56cf24 Mon Sep 17 00:00:00 2001 From: "xiaohui.wang" Date: Fri, 27 May 2022 22:42:05 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E7=A7=81=E6=8C=89=E9=92=AE=E5=AE=89?= =?UTF-8?q?=E5=8D=93=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Examples/Scripts/SettingPopViewButton.cs | 20 ++++++++----------- .../Settings/SettingPopViewButton.prefab | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/popcorn/Assets/Examples/Scripts/SettingPopViewButton.cs b/popcorn/Assets/Examples/Scripts/SettingPopViewButton.cs index 9fec6e20..e967bba0 100644 --- a/popcorn/Assets/Examples/Scripts/SettingPopViewButton.cs +++ b/popcorn/Assets/Examples/Scripts/SettingPopViewButton.cs @@ -4,15 +4,15 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using Joypac; -//#if UNITY_ANDROID -//using JoyAdSigle = JoyPacCurrentcyAdSingle; -//#endif -public class SettingPopViewButton : MonoBehaviour +#if UNITY_ANDROID +using JoyAdSigle = JoyPacCurrentcyAdSingle; +#endif +public class SettingPopViewButton : JPButton { #if UNITY_ANDROID - private JoyPacCurrentcyAdSingle _currAdSigle = new JoyPacCurrentcyAdSingle(); + private JoyAdSigle _currAdSigle; #endif - public void OnClick() + public override void OnClick() { #if UNITY_IOS JoypacAdClient.Instance.ShowSettingPopView(); @@ -20,14 +20,10 @@ public class SettingPopViewButton : MonoBehaviour #if ANDROID_GP return; #endif - + _currAdSigle = new JoyAdSigle(); if (_currAdSigle != null) - { - - Debug.Log("点击隐私协议"); + Debug.Log("隐私界面"); _currAdSigle.showAgreementPermissionPop(); - - } #endif } diff --git a/popcorn/Assets/MyGame/Scenes/Settings/SettingPopViewButton.prefab b/popcorn/Assets/MyGame/Scenes/Settings/SettingPopViewButton.prefab index c8e723cf..0db58130 100644 --- a/popcorn/Assets/MyGame/Scenes/Settings/SettingPopViewButton.prefab +++ b/popcorn/Assets/MyGame/Scenes/Settings/SettingPopViewButton.prefab @@ -199,8 +199,8 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 1682034354971069933} - m_MethodName: OnClick + - m_Target: {fileID: 0} + m_MethodName: m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0}