插件怎么调用cc.sys.localStorage.clear清除存档?

cocos编辑器版本:3.8.7
我想在开发中删除游戏存档,注意不是在游戏运行状态下删除存档。为了方便直接一键清除, 我创建了个空白插件,调用cc.sys.localStorage.clear()没用,提示Method does not exist(blank-template.showLog), The ‘methods’ of the module is undefined

不可以,插件环境和运行环境是不一样的

那么清除localStorage只能在游戏中加一个debug菜单然后手动清除咯?

也可以打开开发者工具(调试界面)->上方页签切换到应用程序(Application)->左侧页签选择本地存储(localStorage)->右键带有当前页面的页签清楚, 也可以点进去看单个删除