public void OnSelectedLocal(ArtWorks artWorks, int id) { if (sprite) { Data.Instance.SetLastArtTexture(texture2d); //Data.Instance.lastArtTexture = sprite.texture; } artWorks.OnSelect(id); }
public IEnumerator OnSelected(ArtWorks artWorks, int id) { yield return StartCoroutine(TextureUtils.LoadRemote(url, value => texture2d = value)); Data.Instance.SetLastArtTexture(texture2d); artWorks.OnSelect(id); yield return null; }