【配置】兼容老包
parent
ee6fde0370
commit
06f54f15b3
|
@ -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
|
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue