CREATE YOUR WORLD
Economy
Item icon thumbnail download API
4 min
the zepeto module package allows you to download thumbnail textures for zepeto items by dynamically downloading item thumbnails, you can help reduce the size of your build package step 1 installing please install window → package manager → zepeto world package 1 21 14 or later version first after that, please install the zepeto module package step 2 ui > adding an image we need to add an image component to the scene that will display the thumbnails please add hierarchy > ui > raw image set the width and height to the same size step 3 write the script create a hierarchy > create empty object and rename it to downloadthumbnail create project > create > zepeto > typescript and rename it to downloadthumbnailsample write the sample script as shown below import { zepetoscriptbehaviour } from 'zepeto script'; import { shopservice } from 'zepeto module shop'; import as unityengine from 'unityengine'; import { rawimage } from 'unityengine ui'; export default class downloadthumbnailsample extends zepetoscriptbehaviour { public image rawimage; public itemcode string; start() { this startcoroutine(this downloaditemtexture()); } downloaditemtexture() { // download thumbnail texture for the specified item code var request = shopservice downloaditemthumbnail(this itemcode); yield new unityengine waituntil(()=>request keepwaiting == false); if(request responsedata issuccess) { this image texture = request responsedata texture; } } } 4\ after you finish writing the script, add the downloadthumbnailsample script to the downloadthumbnail object 5\ assign image to the script inspector and enter the itemcode 📘 please refer to the mannequin guide on how to check the itemcode \[ zepeto mannequin docid\ gyqluyr123q418u dgrio ] 6\ press the \[▶︎(play)] button to execute, and you should see the item thumbnail in the image you set