diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 0c8b296fbe..b374584dba 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -918,6 +918,12 @@ function this.CheckScreenRightRedPoint() if UIManager.camera ==nil then return end + if this.btnPokemon.transform==nil then + return + end + if this.btnColorfulWorld.transform==nil then + return + end pos1=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnPokemon.transform.position) pos2=RectTransformUtility.WorldToScreenPoint(UIManager.camera,this.btnColorfulWorld.transform.position) if (pos1.x>Screen.width and RedpotManager.GetRedPointStatus(RedPointType.PokemonMainCity)==RedPointStatus.Show) or (pos2.x>Screen.width and RedpotManager.GetRedPointStatus(RedPointType.Vientiane)==RedPointStatus.Show) then