【配置】兼容老包

dev_chengFeng
gaoxin 2021-03-10 14:56:53 +08:00
parent ee6fde0370
commit 06f54f15b3
3 changed files with 14 additions and 2 deletions

View File

@ -63,4 +63,12 @@ function ServerConfigManager.GetConfigInfo(key)
local s = ConfigMgr:GetConfigInfo(key) local s = ConfigMgr:GetConfigInfo(key)
return s return s
end end
end
function ServerConfigManager.GetSDKVersionCode()
if AppConst.isSDK then
return AndroidDeviceInfo.Instance:GetVersionCode()
end
return 9999
end end

View File

@ -71,7 +71,9 @@ end
-- 获取设备Id -- 获取设备Id
function this.GetDeviceId() function this.GetDeviceId()
if AppConst.isSDK then if AppConst.isSDK then
if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.ThinkAnalysis_GetDeviceID) then if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.ThinkAnalysis_GetDeviceID)
or ServerConfigManager.GetSDKVersionCode() >= 24
then
return App.TAMgr:GetDeviceId() return App.TAMgr:GetDeviceId()
end end
return AndroidDeviceInfo.Instance:GetDeviceID() return AndroidDeviceInfo.Instance:GetDeviceID()

View File

@ -67,7 +67,9 @@ function GetPreferredWidth(_transform)
end end
function ForceRebuildLayout(_transform) function ForceRebuildLayout(_transform)
if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.LayoutBuilderWrap) then if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.LayoutBuilderWrap)
or ServerConfigManager.GetSDKVersionCode() >= 25
then
if not LayoutRebuilder then if not LayoutRebuilder then
LayoutRebuilder = UnityEngine.UI.LayoutRebuilder LayoutRebuilder = UnityEngine.UI.LayoutRebuilder
end end