hch
4 天以前 67f11d7f228d445166969d16992fc81d725dddce
0312 启动日志 测试硬核无广告渠道不能跳过广告问题
2个文件已修改
27 ■■■■■ 已修改文件
Main/Manager/StageManager.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/BoneField/AdsManager.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Manager/StageManager.cs
@@ -132,18 +132,18 @@
        UIManager.Instance.OpenWindow<MainWin>();
        //游戏内日志关闭
#if !UNITY_EDITOR
        if (File.Exists(Directory.GetParent(Application.persistentDataPath) + "/Debug") ||
        LocalSave.GetString("#@#BrancH") != string.Empty)
        {
            Debug.unityLogger.logEnabled = true;
        }
        else
        {
            Debug.unityLogger.logEnabled = false;
        }
// #if !UNITY_EDITOR
//         if (File.Exists(Directory.GetParent(Application.persistentDataPath) + "/Debug") ||
//         LocalSave.GetString("#@#BrancH") != string.Empty)
//         {
//             Debug.unityLogger.logEnabled = true;
//         }
//         else
//         {
//             Debug.unityLogger.logEnabled = false;
//         }
#endif
// #endif
    }
    protected async UniTask OnLoading(AsyncOperation asyncOperation, Func<float> getLoadingProgress, Func<UniTask> anthorTask = null)
Main/System/BoneField/AdsManager.cs
@@ -103,6 +103,7 @@
        if (!InvestModel.Instance.IsInvested(InvestModel.monthCardType) &&
        !InvestModel.Instance.IsInvested(InvestModel.foreverCardType))
        {
            Debug.LogFormat("ads:SDKUtils.channelSign = |{0}|", SDKUtils.channelSign);
            //有广告的SDK
            if (VersionConfig.Get().appId == "ryzj" && !string.IsNullOrEmpty(SDKUtils.channelSign) &&
                !GeneralDefine.noAdsChannels.Contains(SDKUtils.channelSign))
@@ -111,6 +112,7 @@
                //奖励需要设置标识对应发放
                if (WaitForLoadNewAd())
                {
                    Debug.Log("ads:等待广告");
                    SysNotifyMgr.Instance.ShowTip("AdLoadFail");
                    return;
                }
@@ -121,12 +123,13 @@
                var aDAwardConfig = ADAwardConfig.Get(waitAdID);
                waitRemainAdsCount = aDAwardConfig.ADCntMax - adsCnt;
                Debug.Log("ads:播放广告");
                SDKUtils.Instance.PlayAds("b69a2b68bb3d22");
                return;
            }
        }
        Debug.LogFormat("ads:直接领取广告 {0}", ADID);
        //没广告的SDK 直接给奖励
        GetAdsAward(ADID);
    }