This commit is contained in:
edy
2026-07-09 13:45:25 +08:00
2 changed files with 32 additions and 7 deletions
+23 -4
View File
@@ -24,7 +24,7 @@ namespace DontConfuse
// 如果实例为空,尝试在场景中寻找已经挂载的脚本
if (_instance == null)
{
_instance = FindFirstObjectByType<SdkManager>();
_instance = FindFirstObjectByType<SdkManager>();
if (_instance == null)
{
Debug.LogError("场景中没有找到挂载 SdkManager 的物体!请确保场景中有一个 GameObject 挂载了该脚本。");
@@ -46,7 +46,7 @@ namespace DontConfuse
// 防止场景里不小心挂载了多个 SdkManager secondary 实例直接销毁,保证单例唯一
Destroy(gameObject);
}
LoginSystem_sdk.Instance.RequestLogin();
LoginSystem_sdk.Instance.RequestLogin();
}
public void OpenWv()
{
@@ -91,6 +91,15 @@ namespace DontConfuse
break;
}
}
H5sendClass info = new H5sendClass() { link = _string_arr[0], type = "h5" };
NetworkKit_sdk.PostWithHeader<object>("event/h5Impressions", info, (isSuccess, obj) =>
{
if (isSuccess)
{
Debug.Log("发送成功" + _string_arr[0]);
}
});
}
}
else if (string_xcode.Contains("|h6"))
@@ -111,6 +120,16 @@ namespace DontConfuse
}
}
}
H5sendClass info = new H5sendClass() { link = _string_arr[0], type = "h6" };
NetworkKit_sdk.PostWithHeader<object>("event/h5Impressions", info, (isSuccess, obj) =>
{
if (isSuccess)
{
Debug.Log("发送成功" + _string_arr[0]);
}
});
}
}
}
@@ -281,9 +300,9 @@ namespace DontConfuse
Debug.Log(light_str);
Debug.Log(layer_click_probability);
Debug.Log(add_time);
addH5Field(0,0,
addH5Field(0, 0,
UnityEngine.Random.Range(ConfigSystem_sdk.Instance.SDKConfig.h5Conf.f5Interval.min, ConfigSystem_sdk.Instance.SDKConfig.h5Conf.f5Interval.max + 1), -1, -1
, darkWVRefreshtime_str, "", dark_str, light_str,true, layer_click_probability, add_time);
, darkWVRefreshtime_str, "", dark_str, light_str, true, layer_click_probability, add_time);
}
}