public void LastUnitDS_CB(string jsonUnitDS) { _unitLatest = JsonUtility.FromJson <UnitLatest>(jsonUnitDS); if (_unitLatest._url == _imgProvider.GetCurrentUrl() && _imgProvider.GetTexture2D() != null) { _unitLatest._texture = _imgProvider.GetTexture2D(); PublishUnit(); return; } _iImgProxy.ReqTexture(_unitLatest._url, ImgProxy.TextureCB_CallerID.APP_UNIT); }
void ReNewDraft() { _uDraft = new UnitLatest(); _uDraft._texture = scrollViewImgContent.texture as Texture2D; if (_imgProvider.GetTexture2D() == _uDraft._texture) { _uDraft._url = _imgProvider.GetCurrentUrl(); } else if (_unitProvider.GetTexture2D() == _uDraft._texture) { _uDraft._url = _unitProvider.GetCurrentUrl(); } // TODO: else, throw exception }
public void SaveUnit_CB(string uJSON) { _unitLatest = JsonUtility.FromJson <UnitLatest>(uJSON); if (!string.IsNullOrEmpty(_unitLatest._url)) { if (_unitLatest._url == _imgProvider.GetCurrentUrl() && _imgProvider.GetTexture2D() != null) { _unitLatest._texture = _imgProvider.GetTexture2D(); PublishUnit(); return; } _iImgProxy.ReqTexture(_unitLatest._url, ImgProxy.TextureCB_CallerID.APP_UNIT); } }
public void ReNewUnitLatestDS() { _unitLatest = new UnitLatest(); }
void AppUnitToDraft() { _uDraft = _unitProvider.GetUnitLatestDS(); }