From b5a64eac4e44df2edfd52d183c39029408921dc8 Mon Sep 17 00:00:00 2001 From: huyufei Date: Wed, 22 May 2024 12:54:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20Unity=20=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=8F=B0=E5=85=A5=E5=8F=A3=E7=9A=84=E5=91=BD=E4=BB=A4?= =?UTF-8?q?,=20=E7=BC=A9=E7=9F=AD=E5=91=BD=E4=BB=A4=E9=95=BF=E5=BA=A6?= =?UTF-8?q?=E5=88=B0=2031=20=E4=B9=8B=E5=86=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/Code/SDK/GuruSDK.Debug.cs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Runtime/Code/SDK/GuruSDK.Debug.cs b/Runtime/Code/SDK/GuruSDK.Debug.cs index ab710d3..c7b29a7 100644 --- a/Runtime/Code/SDK/GuruSDK.Debug.cs +++ b/Runtime/Code/SDK/GuruSDK.Debug.cs @@ -3,9 +3,9 @@ namespace Guru { public partial class GuruSDK { - private const string K_CMD_NAME_DEBUGGER = "dbg"; - private const string K_CMD_NAME_WATERMARK = "wm"; - private const string K_CMD_NAME_CONSOLE = "con"; + private const string K_CMD_NAME_DEBUGGER = "debug.guru.dbg"; + private const string K_CMD_NAME_WATERMARK = "debug.guru.wm"; + private const string K_CMD_NAME_CONSOLE = "debug.guru.con"; @@ -22,30 +22,29 @@ namespace Guru UnityEngine.Debug.LogError("--- App Bundle Id is empty, please set it first. ---"); return; } - - + string val; string key; - key = $"debug.{AppBundleId}.{K_CMD_NAME_DEBUGGER}"; + key = K_CMD_NAME_DEBUGGER; val = AndroidSystemPropertiesHelper.Get(key); - if (IsCmdAvailable(val)) + if (val == AppBundleId) { // 显示应用调试状态栏 Debugger.ShowAdStatus(); } - key = $"debug.{AppBundleId}.{K_CMD_NAME_WATERMARK}"; + key = K_CMD_NAME_WATERMARK; val = AndroidSystemPropertiesHelper.Get(key); - if (IsCmdAvailable(val)) + if (val == AppBundleId) { // 显示应用水印 // TODO } - key = $"debug.{AppBundleId}.{K_CMD_NAME_CONSOLE}"; + key = K_CMD_NAME_CONSOLE; val = AndroidSystemPropertiesHelper.Get(key); - if (IsCmdAvailable(val)) + if (val == AppBundleId) { // 显示控制台