CREATE YOUR WORLD
Data Storage
PlayerPrefs - Saving data to the device
1min
provides the ability to save players to the device they are connecting to it can be called from the client zepeto script, and data will not be preserved if you delete the app or change the device it supports use in the same way as playerprefs in unity, and the storage capacity is limited to 10kb ▼ example code for checking the number of plays using the save & load function import { zepetoscriptbehaviour } from 'zepeto script'; import { playerprefs } from 'unityengine'; export default class clientsaveload extends zepetoscriptbehaviour { private playcntkey string = 'keyname'; start() { if (playerprefs haskey(this playcntkey)) { playerprefs setint(this playcntkey, playerprefs getint(this playcntkey) + 1); console log(`playcnt ${ playerprefs getint(this playcntkey) }`); } else { playerprefs setint(this playcntkey, 1); console log('playcnt 1'); } } } 📘 view unity playerprefs information https //docs unity3d com/scriptreference/playerprefs html https //docs unity3d com/scriptreference/playerprefs html