local HeroDetail_Controller = {} local private = { isSceneLowEffect = false, --仅调试使用 } local defaultHeroScenePath = ConstAssetPathConfig.defaultHeroScenePath HeroDetail_Controller.AWAKEN_SCENE_PATH = ConstAssetPathConfig.AwakenScenePath ---该方法仅在Cheat_Controller中调用,调试功能时使用 ---未来可以考虑放到cheat模块中,并整合到取画质等判断接口内部 function HeroDetail_Controller.ConvertHeroShowSceneMode() private.isSceneLowEffect = not private.isSceneLowEffect end function HeroDetail_Controller.GetHeroShowDetail(heroId, isAwaken) local scenePath local modelPath, equipTable, modelScale, lightPath, heroEffectPath, heroLightEffects = UTL.UIRender.LoadShowHero(heroId, nil, nil, true) if HeroDetail_Controller.IsShowDefaultHeroScenePath() or private.isSceneLowEffect then -- 设备lod 为 0 的设备使用默认的场景路径 scenePath = defaultHeroScenePath elseif isAwaken then scenePath = HeroDetail_Controller.AWAKEN_SCENE_PATH else -- 设备lod 不为 0 的设备使用配置的场景路径 local heroData = DataSheetManager.HeroNum:GetDataByID(heroId) if not string.isNilOrEmpty(heroData.HeroSpecialScene) then scenePath = heroData.HeroSpecialScene else local kingdomData = DataSheetManager.HeroCountry:GetDataByID(heroData.Kingdom) scenePath = kingdomData.UiScene end local heroWearAppearanceID = MDL.HeroSelect.GetAppearanceIDByHeroID(heroId) if heroWearAppearanceID and heroWearAppearanceID > 0 then lightPath = DataSheetManager.HeroAppearance:GetDataByID(heroWearAppearanceID).PreviewModelLight_New else lightPath = heroData.PreviewModelLight_New end end if CTL.HotFix.CanAssetLoad(scenePath) == false then scenePath = defaultHeroScenePath end return scenePath, modelPath, equipTable, modelScale, lightPath, heroEffectPath, heroLightEffects end function HeroDetail_Controller.IsShowDefaultHeroScenePath() if SettingAPI.deviceLevel == 0 then return true end if UNITY_IOS then return SystemInfo.systemMemorySize < 3200 end return false end ---在编辑器中便捷查看高低特效时展示不同模型的调试方法 function HeroDetail_Controller.GetSceneLowEffectSetting() return private.isSceneLowEffect end return HeroDetail_Controller