Make icon marketplace use cache

This commit is contained in:
2026-02-02 18:15:52 -07:00
parent 8e5fb1dbdc
commit 27ddf004b8
5 changed files with 40 additions and 10 deletions

View File

@@ -170,7 +170,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
{
GameObject newIcon = Instantiate(sample, content.transform);
newIcon.name = "IconEntry";
Tools.RenderFromBase64(entry.Data, newIcon.transform.GetChild(0).GetChild(0).GetComponent<Image>());
newIcon.transform.GetChild(0).GetChild(0).gameObject.AddComponent<WaitingForCustomIcon>().ID = entry.ID;
newIcon.transform.GetChild(1).GetComponent<TMP_Text>().text = "Icon Name: " + entry.Name;
newIcon.transform.GetChild(2).GetComponent<TMP_Text>().text = "Price " + Tools.FormatWithCommas(entry.Price) + " coins";
newIcon.transform.GetChild(3).GetComponent<TMP_Text>().text = "Designer Name: " + entry.CreatorUsername;
@@ -213,6 +213,7 @@ public class IconMarketplaceDownloadIcon : MonoBehaviour
newIcon.SetActive(true);
Tools.RefreshHierarchy(newIcon);
}
CustomIconLoader.Init(FindObjectsByType<WaitingForCustomIcon>(FindObjectsSortMode.None));
refreshButton.interactable = true;
optionsButton.interactable = true;
backButton.interactable = true;