// ------------------------------------------- /* * LoadNewImage */ private bool LoadNewImage(GameObject _origin, long _id, Image _image, int _height, bool _showLoadingMessage) { m_imageReferenceTmp = new ImageRequestedInfo(_origin, _id, _image, _height, _showLoadingMessage); ImageModel imageModel = GetImageByID(m_imageReferenceTmp.Id); if (imageModel != null) { UIEventController.Instance.DispatchUIEvent(EVENT_IMAGE_LOADED_REPORT_SYSTEM, _image); try { ImageUtils.LoadBytesImage(m_imageReferenceTmp.Image, imageModel.Data, m_imageReferenceTmp.Height, MenusScreenController.Instance.SizeHeightAllowedImages); } catch (Exception err) { if (MenusScreenController.Instance.DebugMode) { Debug.Log(err.StackTrace); } }; UIEventController.Instance.DispatchUIEvent(EVENT_IMAGES_LOAD_SERVER_LOCAL_DATA_LOADED); return(true); } else { if (_showLoadingMessage) { MenusScreenController.Instance.CreateNewInformationScreen(ScreenInformationView.SCREEN_WAIT, UIScreenTypePreviousAction.KEEP_CURRENT_SCREEN, LanguageController.Instance.GetText("message.info"), LanguageController.Instance.GetText("message.please.wait"), null, ""); } CommsHTTPConstants.LoadImage(m_imageReferenceTmp.Id); } if (m_images.Count > LIMIT_IMAGES_IN_MEMORY_TO_CLEAR) { m_images.Clear(); } return(false); }