Cocos Creator Editor 读取和保存.meta
2021-01-17 14:14
标签:texture files set meta cts code metadata edit xtu Cocos Creator Editor 读取和保存.meta 标签:texture files set meta cts code metadata edit xtu 原文地址:https://www.cnblogs.com/kingBook/p/13364050.html//读取.meta
//result.path 如:E:\projects\ccc_test\assets\arrow.plist
let plistMetaPath=result.path+".meta"
let plistMetaStrings=fs.readFileSync(plistMetaPath,‘utf8‘);
let plistMetaData=JSON.parse(plistMetaStrings);
//Editor.log(plistMetaData);
//Editor.log(plistMetaData.rawTextureUuid);
//Editor.log(plistMetaData.subMetas);
//保存.meta
let plistMetaDataStrings=JSON.stringify(plistMetaData,null,"\t");
Editor.assetdb.saveMeta(plistMetaData.uuid,plistMetaDataStrings,(err,meta)=>{});
文章标题:Cocos Creator Editor 读取和保存.meta
文章链接:http://soscw.com/index.php/essay/43228.html